Given two matrices of the same size, that is, the two matrices have the same number of rows and columns, we define their sum by constructing a third matrix whose entries are the sum of the corresponding entries of the original two matrices.
It is an easy matter (see any text in linear algebra) to show that matrix addition is both associative and commutative. That is (A+B)+C = A+(B+C), and A+B=B+A. Assuming, of course, that the matrices are of the same size.
The product AB of two matrices is defined only if the number of columns in the first factor, A, equals the number of rows in the second factor, B. The resultant product is a matrix with the same number of rows as A (the first factor) and the same number of columns as B (the second factor). To compute the i-j entry of the product matrix we take the inner product of the ith row of A with the jth column of B. (Note that the number of entries in each row of A is exactly the same as the number of entries in each column of B.)
This definition of matrix multiplication enables us to write the following system of equations as a single matrix equation.
An extremely useful way to view the multiplication of an m by n matrix by a single column matrix with n entries is as follows:
That is, the product AX is equal to the first entry in X times the first column of A plus the second entry of X times the second column of A, etc.
The product of a scalar and a matrix is easy to compute. To get the entries of the resultant matrix, multiply each entry of the original matrix by the scalar.
The transpose of an m by n matrix, A, is an n by m matrix, and is obtained by writing the rows of A as the columns of its transpose. That is, the first row of A becomes the first column of A transpose, etc.