2.5 Matrices and determinants



A matrix is a rectangular array of quantities, called the elements of the matrix.

We identify matrices according to "the number of rows the number of columns". A matrix with m rows and n columns is said to be an m-by-n matrix [1,5]. For example:


When number of rows = number of columns, we have a square matrix. In graphics, we frequently work with 2-by-2, 3-by-3, and 4-by-4.

A matrix with a single row or column represents a vector, and a larger matrix can be viewed as a collection of row or column vectors.

2.5 Matrices and determinants



The individual elements of a matrix are conventionally given lowercase symbols and distinguished by subscripts: the ijth element of matrix B is denoted as bij, for example the matrix A and B above can be expressed as:


Two common square matrices are the zero matrix, and the identity matrix denoted by the symbol "I".

All of the elements of the zero matrix are zero.

All are zero for the identity matrix, too, except those along the main diagonal (those elements aij for which i=j), which have the value unity. The 3-by-3 identity matrix is therefore given by:



2.5 Matrices and determinants



The transpose of a matrix M, denoted by MT, is formed by interchanging the rows and columns of M. for example:


To multiply a matrix A by a scalar value s, we just multiply each element of the matrix by s. For example:


Matrix addition is defined only for matrices with the same number of rows and columns; two matrices are added by simply adding corresponding elements. For example:



2.5 Matrices and determinants



Since matrices can be added and scaled, it is meaningful to define linear combinations of matrices (of the same shape), such as 2A-4B.

Note that A+B=B+A. We can multiply an m × n matrix A by a p × q matrix B only if n = p. We obtain an m × q matrix C whose elements are calculated as in the following example:


More formally, the element at (i,j) in the resulting matrix is the result of taking the dot product between the ith row in A and the jth column in B. If we use matrix notation to describe two vectors, multiplication produces the same result as the dot product, as long as we assume that the first vector is a row vector and the second is a column vector.

For example if A = (1,2,3) and B = (4,5,6) are two vectors, then their dot product in matrix notation can be given as:


2.5 Matrices and determinants



Every square matrix M has a number associated with it called its determinant and denoted by |M|. The determinant describes the volume of certain geometric shapes and provides information concerning the effect that linear transformation has on areas and volumes of objects.

For a 2-by-2 matrix M, the determinant is simply the difference of two products:

If M is a 3-by-3 matrix, its determinant has the form:



2.5 Matrices and determinants



Accordingly,


Note that as one moves along a row or column, the value of (-1)i+j alternates between 1 and -1. One can visualize a checkerboard pattern of 1's and -1's distributed over the matrix [1,6].

2.5 Matrices and determinants




2.5 Matrices and determinants




2.5 Matrices and determinants




2.5 Matrices and determinants




2.5 Matrices and determinants




2.5 Matrices and determinants




2.5 Matrices and determinants




2.5 Matrices and determinants




2.5 Matrices and determinants