matmult
Matrix Multiplication
Description
Performs matrix multiplication on two conformable matrices.
Usage
x %*% y
Arguments
x,y |
matrix or vector, which is numeric or complex. Missing values (NA) are allowed
|
Details
Any computation involving a missing value will result in a missing value.
The last extent of x must be the same size as the first extent of y.
Vectors are not oriented, therefore a vector of length n can multiply an n by n matrix on the left or right.
If neither x nor y are matrices, then the result of x %*% y will be a one by one matrix.
The expression x * y will perform element-wise multiplication, not matrix multiplication.
Value
matrix which is the matrix product of x and y.
See Also
Examples
freeny.ls <- lsfit(Sdatasets::freeny.x, Sdatasets::freeny.y)
fit <- cbind(1, Sdatasets::freeny.x) %*% freeny.ls$coef