Let x and y be two matrices having identical dimension n by k.
Addition:
The addition of the two matrices x and y, denoted by x + y or equivalently y + x, results
in the n by k matrix, say z, whose (i,j)th element is given by z[i,j] = x[i,j] + y[i,j], i.e., the
elements of the matrices x and y are added elementwise.
Subtraction:
The subtraction of the matrix y from the matrix x, denoted by x - y, results in the n by k
matrix, say z, whose (i,j)th element is given by z[i,j] = x[i,j] - y[i,j], i.e., the elements of
the matrices are subtracted elementwise.
Multiplication:
The elementwise multiplication of the matrix x by the matrix y, also referred to as the
Hadamard product, is denoted by xey, or equivalently by yex. The resulting matrix,
say z, has (i,j)th element z[i,j] = x[i,j]y[i,j], i.e., the elements of the matrices x and y are
multiplied together elementwise.
Division:
The division of the matrix x by the matrix y, denoted by x./y, results in the n by k matrix,
say z, whose (i,j)th element is given by z[i,j] = x[i,j]/y[i,j], i.e., the elements of the
matrices are divided elementwise.
GAUSS command:
x + y adds the matrices x and y
x - y subtracts the matrix y from the matrix x
x.*y Hadamard (elementwise) product of x and y having identical row and
column dimensions. Also note that this command can be used to
"sweep multiply" a vector y elementwise through each of the columns
in x. If the column vector y has the same row dimension as the matrix
x, then the resultant matrix is a matrix having the same dimension as x
with each column of x elementwise multiplied by the respective entries
in y. If y is a row vector having the same number of columns as x,
then each column of x is scalar multiplied by the respective scalar in y.
- MATRIX REVIEW WITH GAUSS.pdf