       Next: Determinants Up: Matrices and determinants Previous: The matrix formalism

## Rules for matrix calculations

Matrices can be multiplied with a number or can be added, subtracted, and multiplied with each other. These operations obey the following rules:

Definition (D 2.4.5) An matrix A is multiplied with a (real) number by multiplying each element with : .

Definition (D 2.4.5) Let and be the general elements of the matrices A and B. Moreover, A and B must be of the same size, i.e. must have the same number of rows and of columns. Then the sum and the difference is defined by i.e. the element of C is equal to the sum or difference of the elements and of A and B for any pair of : .

The definition of matrix multiplication looks more complicated at first sight but it corresponds exactly to what is written in full in the formulae (2.2.1) to (2.2.4) of Section 2.2. The multiplication of two matrices is defined only if the number of columns of the ft trix is the same as the number of rows of the ght trix. The numbers of rows of the ft trix and of columns of the ght trix are free.

We first define the product of a matrix A with a column a:

Definition (D 2.4.5) The multiplication of an ( ) matrix A with an ( ) column a is only possible if the number of columns of the matrix is the same as the length of the column a. The result is the matrix product d = A a which is a column of length . The -th element of d is (2.4.1)

For and this is the same procedure as in equations (2.2.1) and (2.2.2), where the coefficients in equation (2.2.1) and in equation (2.2.2) are replaced by here, and the left sides and are replaced by . The terms and of equations (2.2.1) and (2.2.2) are not represented in equation (2.4.1).

Written as a matrix equation this is In an analogous way one defines the multiplication of a row matrix with a general matrix.

Definition (D 2.4.5) The multiplication of a row a , with an ( ) matrix A is only possible if the length , i.e. the number of columns', of the row is the same as the number of rows of the matrix. The result is the matrix product d = a A which is a row of length . The -th element of d is .

Written as a matrix equation this is The multiplication of two matrices (both neither row nor column) is the combination of the already defined multiplications of a matrix with a column (matrix on the left, column on the right side) or of a row with a matrix (row on the left, matrix on the right side). Remember: The number of columns of the left matrix must be the same as the number of rows of the right matrix.

Definition (D 2.4.5) The matrix product C = A B, or is defined by Examples.

If and ,

then . On the

other hand, .

Obviously, C D, i.e. matrix multiplication is not always commutative. However, it is associative, e.g., (AB)D = A(BD), as the reader may verify by performing the indicated multiplications. One may also verify that matrix multiplication is distributive, i.e.
(A + B)C = AC + BC.

In indices notation' (where A is an matrix, B an matrix) the matrix product is (2.4.2)

Remarks.

1. The matrix A has the same number of columns as B has rows; the number of rows is inherited' from A to C, the number of columns from B to C.
2. A comparison with equation (2.2.4) shows that exactly the same construction occurs in the matrix product when describing consecutive mappings by matrix-column pairs. Also the product of the matrix B with the column a will be recognized. It is for this reason that the matrix formalism has been introduced. Affine mappings (also isometries and crystallographic symmetry operations) in point space are described by matrix-column pairs, see Sections 2.2 and 4.1.
3. The power notation' is used in the same way for the matrix product of a square matrix with itself as for numbers: AA = A ; AAA = A , etc.
4. Using the formulae of this section one confirms equations (2.2.5) to (2.2.8).     Next: Determinants Up: Matrices and determinants Previous: The matrix formalism