2.6 Matrices

Matrices are mathematical entities consisting of specifically ordered groups of numbers. An example of a matrix is shown in expression 2.262.

[ a11 a12 a13 a21 a22 a23 a31 a32 a33 ] (2.262)

Matrix 2.262 is considered a 3 x 3 size matrix because it has 3 rows and 3 columns. Please note that when specifying the size of matrix, the number of rows always comes first (i rows x j columns). This convention extends to the subscripts of our inner-matrix terms; at location row 2 column 1 we have a12.

A number of specific operations can be performed on matrices. The ability to perform said operations typically depends on the size of the given matrix (or matrices). We will cover the most common matrix operations in the following sections.

Matrix Addition

Matrices can be added as shown in equation 2.263.

[ a11 a12 a13 ... a1j a21 a22 a23 ... a2j a31 a32 a33 ... a3j . . . . . . . . . ai1 ai2 ai3 ] + [ b11 b12 b13 ... b1j b21 b22 b23 ... b2j b31 b32 b33 ... b3j . . . . . . . . . bi1 bi2 bi3 ] = [ a11 + b11 a12 + b12 a13 + b13 ... a1j + b1j a21 + b21 a22 + b22 a23 + b23 ... a2j + b2j a31 + b31 a32 + b32 a33 + b33 ... a3j + b3j . . . . . . . . . ai1 + bi1 ai2 + bi2 ai3 + bi3 ] (2.263)

Only matrices of the same size can be added.

Scalar Multiplication

A matrix can be multiplied by a scalar (k) as shown in equation 2.264.

k([ a11 a12 a13 ... a1j a21 a22 a23 ... a2j a31 a32 a33 ... a3j . . . . . . . . . ai1 ai2 ai3 ] ) = [ k a11 k a12 k a13 ... k a1j k a21 k a22 k a23 ... k a2j k a31 k a32 k a33 ... k a3j . . . . . . . . . k ai1 k ai2 k ai3 ] (2.264)

There are no limitations on the size of matrices that be multiplied by a scalar.

Matrix Multiplication

Matrix multiplications derives its logic from coordinate system transformations. However, since this is not a mathematics book, we will not go into covering the motivation for matrix multiplication convention. Rather, simply the methodology will be presented.

Unlike scalar multiplication, the order in which two matrices are multiplied matters. The output matrix is calculated by taking the dot product of the columns in the first matrix with the rows in the second matrix. As can be deduced from the previous sentence, this means that the number of columns in the first matrix must match the number of rows in the second matrix. Generalized matrix multiplication is shown in equation 2.265.

[ a11 a12 ... a1j a21 a22 ... a2j . . . . . . ai1 ai2 ] [ b11 b12 ... b1n b21 b22 ... b2n . . . . . . bm1 bm2 ] = [ a11b11 + a12b21 a11b12 + a12b22 a11b13 + a12b23 ... a21b11 + a22b21 a21b12 + a22b22 a21b13 + a22b23 ... . . . . . . ] (2.265)

As can be observed, we multiplied i x j matrix A with m x n matrix B. Given that j must equal m, our result is a i x n matrix.

Transposition

The transpose of a matrix is accomplished by switching the rows and columns of a matrix as shown in equation 2.266.

( [ a11 a12 a13 ... a1j a21 a22 a23 ... a2j a31 a32 a33 ... a3j . . . . . . . . . ai1 ai2 ai3 ] ) T = [ a11 a21 a31 ... ai1 a12 a22 a32 ... ai2 a13 a23 a33 ... ai3 . . . . . . . . . a1j a2j a3j ] (2.266)

As can be deduced, any size matrix can be transposed.

Some properties associated with transposed matrices are provided in equations 2.267, 2.268, 2.269, and 2.270.

([A]T) T = [A] (2.267)

([A][B])T = [B]T[A]T (2.268)

([A] + [B])T = [A]T + [B]T (2.269)

([A][B][C])T = [C]T[B]T[A]T (2.270)

Determinant

A determinant of a matrix is a number that is calculated from a matrix. The determinant of a 2 x 2 matrix is calculated as shown in equation 2.271.

𝑑𝑒𝑡 ( [ a11 a12 a21 a22 ] ) = a11a22a12a21 (2.271)

The determinant of a 3 x 3 matrix is calculated as shown in equation 2.272.

𝑑𝑒𝑡 ( [ a11 a12 a13 a21 a22 a23 a31 a32 a33 ] ) = a11 (a22a33 a23a32)a12 (a21a33 a23a31)+a31 (a21a32 a22a31) (2.272)

It is possible to find the determinant of larger square matrices. However, the methodology for this is not covered in this book.

As will be reviewed in the inverse section, a matrix can only be inverted if it has a nonzero determinant.

Cofactor Matrix

The cofactor matrix is a new matrix that can be calculated from a given square matrix. Within this section, we will review how to calculate a cofactor matrix only for 3 x 3 matrix. A sample 3 x 3 matrix is provided in equation 2.273.

[ a11 a12 a13 a21 a22 a23 a31 a32 a33 ] (2.273)

The co-factor matrix of matrix 2.273 is symbolized by matrix 2.274.

[ C11 C12 C13 C21 C22 C23 C31 C32 C33 ] (2.274)

Each corresponding C term is calculated by finding the determinant of the 4 other matrix terms not included in the target term row or column. The following equations show this for all C values in matrix 2.274.

C11 = 𝑑𝑒𝑡 ( [ a22 a23 a32 a33 ] )

C12 = 𝑑𝑒𝑡 ( [ a21 a23 a31 a33 ] )

C13 = 𝑑𝑒𝑡 ( [ a21 a22 a31 a32 ] )

C21 = 𝑑𝑒𝑡 ( [ a12 a13 a32 a33 ] )

C22 = 𝑑𝑒𝑡 ( [ a11 a13 a31 a33 ] )

C23 = 𝑑𝑒𝑡 ( [ a11 a12 a31 a32 ] )

C31 = 𝑑𝑒𝑡 ( [ a12 a13 a22 a23 ] )

C32 = 𝑑𝑒𝑡 ( [ a11 a13 a21 a23 ] )

C33 = 𝑑𝑒𝑡 ( [ a11 a12 a21 a22 ] )

Please note that some of co-factor matrix terms have a selectively placed coefficient negative.

Inverse

The inverse of example matrix [A] is referred to as [A]1. Its definition is shown in equation 2.275.

[A][A]1 = [ 1 0 0 ... 0 1 0 ... 0 0 1 ... . . . . . . . . . ] (2.275)

Not all matrices are invertable. The matrix to the right hand side in equation 2.275 is called the identity matrix, and within this book will be symbolized as [I]. The identity matrix is always square (i = j) and has a value of 1 in the diagonal indices, along with 0 in all other indices. As can be deduced, for a matrix to have an inverse it must be square. There are two methods to finding the inverse of a matrix; the Gauss Jordan Elimination method and the adjoint method. They will be presented using an example 3 x 3 matrix.

The Gauss Jordan Elimination method involves starting with the set up shown in expression 2.276.

[ a11 a12 a13 | 1 0 0 a21 a22 a23 | 0 1 0 a31 a32 a33 | 0 0 1 ] (2.276)

The subsequent rows are multiplied by scalars and added to each other with the goal of making the left hand side of expression 2.276 become the identity matrix [I]. When this occurs, the right hand side of expression 2.276 will be [A]1.

The adjoint method involves calculating the inverse of a matrix using equation 2.277.

A1 = 1 𝑑𝑒𝑡([A])[C]T (2.277)

In equation 2.277, [C] is the cofactor matrix (the method of calculating this matrix was explained previously) of original matrix [A].

The method of finding the cofactor matrix was within this book only presented for a 3 x 3 matrix. For a 2 x 2 matrix, the equation 2.277 can be rewritten as shown in equation 2.278.

[A]1 = 1 𝑑𝑒𝑡([A]) [ a22 a21 a12 a11 ] (2.278)

2.6.1 Eigenvalues and Eigenvectors

A vector (section 2.3) of a1î + a2ĵ + a3k^ + ... + ai form can be expressed as a matrix as shown in equation 2.279.

[ a1 a2 a3 . . . ai ] (2.279)

Essentially, vectors can be thought of as column matrices with dimensions of (i, 1) where i is the number of basis vectors in the given vector space (i should not be confused with î, which is simply a basis vector as specified in section 2.3). If we multiply an input vector [a] (in matrix form) of dimension (i, 1) by a matrix [b] of dimension (i,i) we will get an output vector [c] of dimension (i, 1). This is shown in equation 2.280.

[ c1 c2 c3 . . . ci ] = [ b11 b12 b13 ... b1j b21 b22 b23 ... b2j b31 b32 b33 ... b3j . . . . . . . . . bi1 bi2 bi3 ] [ a1 a2 a3 . . . ai ] (2.280)

For this reason, matrices can be thought of operating onto vectors, and are commonly referred to as operators. In most cases, the input vector i will be linearly independent of the output vector o for a given matrix as shown in Figure 2.10a. However, depending on the matrix a specific i can output a o which is a scalar multiple of i (i.e. o is proportional to and acts in the same direction as i). This is shown in Figure 2.10b. When this happens, the i is referred to as a eigenvector. The ratio ||o|| ||i|| is referred to as a eigenvalue.

PIC

Figure 2.10: Graph showing the input vector i and output vector o for a given 2x2 matrix. (a) shows a scenario o is linearly independent of i. (b) shows an o which is linearly dependent on i; i is an eigenvector.

Our task is to find eigenvectors and their corresponding eigenvalues for a given matrix [B]. This problem is shown mathematically in equation 2.281.

[B] v = λv (2.281)

In equation 2.281, v is the eigenvector, and λ is the eigenvalue. Subtracting λv from both sides, we get equation 2.282.

[B] v λv = 0 (2.282)

However, following the rules of section 2.6.0.0, the dimensions of [B] v and λv do not match, meaning that we cannot add them. Luckily for us, we can make λv have matching dimensions by multiplying by the identity matrix [I] (explained in section 2.6.0.0).

[B] v λ[I]v = 0 (2.283)

Factoring out v, we get equation 2.284.

([B] λ[I])v = 0 (2.284)

Multiplying both sides by ([B] λ[I])1, we get equation 2.285.

([B] λ[I])1 ([B] λ[I])v = 0 (2.285)

From the zero product property, we know that either ([B] λ[I])1 ([B] λ[I]) or v must equal 0. From section 2.6.0.0 we know that ([B] λ[I])1 ([B] λ[I]) = 1. So, this would force v = 0. However, we are looking for non-zero eigenvectors! So, we can state that we are interested in eigenvectors where ([B] λ[I])1 ([B] λ[I])1, which means we are looking for solutions where ([B] λ[I]) is not invertable. As reviewed in section 2.6.0.0 a matrix is not invertable if its determinant (section 2.6.0.0) is equal to 0. Therefore, we can solve for eigenvalues λ using equation 2.286.

𝑑𝑒𝑡 ([B] λ[I]) = 0 (2.286)

It is possible to get anywhere between i and 0 eigenvalues for a matrix of dimensions (i,i). The eigenvector can be found by solving equation 2.287 for each eigenvalue λ.

([B] λn[I])vn = 0 (2.287)

In equation 2.287, the n subscript in λn and vn indicates that the eigenvalue vn corresponds to eigenvalue λn.

The eigenvalues for a matrix can be expressed as a diagonal form as shown in equation 2.288.

[λ] = [ λ1 0 ... 0 0 λ2 ... 0 . . . . . . 0 0 ... λi ] (2.288)

The eigenvectors for a given matrix can be expressed in matrix form by stacking the eigenvectors horizontally as shown in equation 2.289.

[V ] = [v1,v2,...,vn] (2.289)

An interesting property of eigenvalues and eigenvectors lies in the fact that original matrix [B] multiplied by its [V ] is equal to [λ] multiplied by [V ]. This is shown in equation 2.290.

[B][V ] = [V ][λ] (2.290)

We can multiply both sides of equation 2.290 by [V ]1 to obtain equation 2.291.

[B] = [V ][λ][V ]1 (2.291)

Expressing [B] in the form shown in equation 2.291 is referred to as diagonalizing the matrix.

The concept of eigenvalues and eigenvectors is critical to understanding the engineering concepts of principle moments of inertia (section ??) and principle stress directions (section ??).