 # Chris Fox's Engineering Section

## Matrices

A matrix is a rectangular array of numbers, enclosed in square brackets.

The type of a matrix is given in the form MxN, where M and N denote the numbers of rows and columns respectively. A square matrix, as the name suggests, is one that has equal numbers of rows and columns. A square matrix is a diagonal matrix if the elements (numbers) not on the main diagonal (top left to bottom right) are all 0. A diagonal matrix is a unit matrix if the elements on the main diagonal are all 1; the viewer will be able to prove, after reading about matrix multiplication, that this matrix is analogous to the pure number 1. A null matrix is one in which all the elements are 0; this is analogous to the pure number 0.

An element of a matrix is denoted in the form Aij; this denotes the element in row i, column j of matrix A. A11 denotes the top left-hand element.

Only matrices of the same MxN type can be added. To find each element of the sum matrix, simply add together the elements in the corresponding positions in the other matrices. This procedure, with the obvious modifications, can also be used in subtraction.

To multiply a matrix by a pure number, simply multiply each element in the matrix by that number.

Two matrices can be multiplied together only if the number of columns in the first matrix is equal to the number of rows in the second. To find the element in row i, column j of the product matrix, simply multiply each element in row i of the first multiplicand matrix, starting from the left, by the element in the corresponding position, counting from the top, in column j of the second multiplicand matrix, then sum the products.

When multiplying matrices, changing the order in which the matrices are written will change the product matrix; matrices are therefore non-commutative. However, when three or more matrices are multiplied together, any pair of adjacent matrices may be multiplied together first; matrices are therefore associative.

To obtain the transpose of a matrix, denoted in the form AT, simply reflect the matrix about the main diagonal. The transpose of an MxN matrix is therefore an NxM matrix. A matrix is symmetric if the transpose is equal to the original matrix.

Multiplying together two matrices, then transposing the product, produces the same result as reversing the order of the multiplicand matrices then multiplying together their transposes.

Consider an equation of the form Mx=y, where M denotes a square matrix, and x and y denote single-column matrices; all three matrices have the same number of rows. If the first single-column matrix contains only variables, and the other matrices contain only numbers, the matrix equation can be rewritten as a set of simultaneous equations, each containing all the variables. If the square matrix could be moved to the other side of the equation, the values of all the variables would be revealed.

The solution is to find a square matrix which, when placed in front of both sides of the equation, combines with the existing square matrix to produce a unit matrix. This second matrix is termed the inverse matrix and is denoted in the form M-1. Manipulating the equation in this way produces x=M-1y, enabling the values of the variables to be calculated.

The inverse of a 2x2 matrix can be determined as follows. First, switch the elements on the main diagonal, and change the signs - positive or negative - of the other elements, thereby producing a second matrix. Then, multiply the second matrix by the original (in either order). This produces a diagonal matrix in which each element on the main diagonal is equal to the determinant of the original matrix; the determinant is denoted in the form |A|. Finally, divide the second matrix by the determinant to obtain the inverse of the original matrix. If the determinant is 0, there is no inverse and the matrix is termed singular.

To find the determinant of a 3x3 matrix, select one row (or column). Multiply each element in the row (or column) by its cofactor, then sum the results. The cofactor of element Aij is obtained by calculating the determinant of the 2x2 matrix formed by those elements not in the same row or column as Aij, then multiplying by (-1)i+j.

The inverse of a 3x3 matrix can be found as follows. First, form a second matrix, B, in which each element is the cofactor of the element in the corresponding position in the original matrix A. If BTA=|A|1, then A-1=BT/|A|.

A multiple of a row (or column) can be added to another row (or column) without changing the determinant. This rule can be used to introduce extra 0s into the matrix, thereby simplifying the calculation.

If matrix A is symmetric, so are A-1 and B. Fewer calculations are needed in this case.

Multiplying together two matrices, then taking the inverse of the product, produces the same result as reversing the order of the multiplicand matrices then multiplying together their inverses.