Learn R Programming

matrixcalc (version 1.0-6)

frobenius.prod: Frobenius innter product of matrices

Description

This function returns the Fronbenius inner product of two matrices, x and y, with the same row and column dimensions.

Usage

frobenius.prod(x, y)

Value

A numeric value.

Arguments

x

a numeric matrix or vector object

y

a numeric matrix or vector object

Author

Frederick Novomestky fnovomes@poly.edu

Details

The Frobenius inner product is the element-by-element sum of the Hadamard or Shur product of two numeric matrices. Let \({\bf{x}}\) and \({\bf{y}}\) be two \(m \times n\) matrices. Then Frobenious inner product is computed as \(\sum\limits_{i = 1}^m {\sum\limits_{j = 1}^n {x_{i,j} \;y_{i,j} } } \).

References

Styan, G. P. H. (1973). Hadamard Products and Multivariate Statistical Analysis, Linear Algebra and Its Applications, Elsevier, 6, 217-240.

See Also

hadamard.prod

Examples

Run this code
x <- matrix( c( 1, 2, 3, 4 ), nrow=2, byrow=TRUE )
y <- matrix( c( 2, 4, 6, 8 ), nrow=2, byrow=TRUE )
z <- frobenius.prod( x, y )
print( z )

Run the code above in your browser using DataLab