$$\require{cancel}$$

# 4.9: Matrices

This book has assumed a knowledge of matrices, which may or may not be justified. In this section, we do not attempt a thorough treatment of the subject, which must be sought elsewhere, but the remarks may be of use both to novices and to the more experienced.

However you may have the opportunity of learning about the manipulation of matrices, it is suggested that you should aim to understand and know how to carry out at least the following operations on matrices whose elements are real numbers:

Multiply a vector by a matrix
Multiply a matrix by a matrix
Calculate the determinant of a square matrix
Invert a square matrix
Diagonalize a symmetric matrix
Test a matrix for orthogonality

Numerous other aspects of matrix manipulation are possible, and the subject expands greatly if we allow the elements to be complex numbers. These six, however, are particularly useful for many applications. It might be mentioned, however, that solving simultaneous linear Equations by Kramers' Rule or by inverting a matrix are very inefficient ways of solving such Equations, and that is not the main purpose of acquiring the above skills.

Most, or doubtless all, of the above operations are available in many modern mathematical computer packages. This is not what I mean, however, by "understand and know how to carry out". The student should carry out at least once by hand calculator, step by step, each of the above operations, and, at each step, try to understand not only the algebraic and arithmetic steps, but also try to visualize the geometric interpretation, particularly when rotating axes and calculating eigenvectors. After doing a hand calculation, you should then write a series of short computer programs (rather than one vast, all-encompassing matrix package) for each operation, so that when, in future, you need to do any of these things, you can instantly obtain the answer without having to go through tedious calculations. For example, in the previous section, when I needed the eigenvectors of the matrix, I was able to generate them with a single word "EIGEN" on a computer; a considerable amount of arithmetic was actually performed by the computer.

On the question of testing a matrix for orthogonality, the usual application in mechanical and geometrical problems is to test a matrix of direction cosines. The tests can not only detect mistakes, but it can locate them and even suggest what the correct element should be. Tests for orthogonality are as follows. The student should try to think of the geometric interpretation of each.

The sum of the squares of the elements in any row or any column is unity. (This test does not guard against mistakes in signs of the elements.)

The sum of the products of corresponding elements in any two rows or in any two columns is zero.

Every element is equal to plus or minus its cofactor.

The determinant of the matrix is plus or minus one.

A minus sign in the last two tests indicates that the two sets of axes differ in chirality (handedness). This usually does not matter, and can easily be dealt with by reversing the signs of the elements of one eigenvector and of its corresponding eigenvalue.