Vectors and Matrices
Total Page:16
File Type:pdf, Size:1020Kb
College of Engineering and Computer Science Mechanical Engineering Department Engineering Analysis Notes Last updated: March 24, 2014 Larry Caretto Introduction to Matrix Analysis Introduction These notes provide an introduction to the use of matrices in engineering analysis. Matrix notation is used to simplify the representation of systems of linear algebraic equations. In addition, the matrix representation of systems of equations provides important properties regarding the system of equations. The discussion here presents many results without proof. You can refer to a general advanced engineering math text1 or a text on linear algebra for such proofs. Parts of these notes have been prepared for use in a variety of courses to provide background information on the use of matrices in engineering problems. Consequently, some of the material may not be used in this course and different sections from these notes may be assigned at different times in the course. Basic matrix definitions A matrix is represented as a two-dimensional array of elements, aij, where i is the row index and j is the column index. The entire matrix is represented by the single boldface symbol A. In general we speak of a matrix as having n rows and m columns. Such a matrix is called an (n by m) or (n x m) matrix. Equation [1] shows the representation of a typical (n x m) matrix. a11 a12 a13 a1m a a a a 21 22 23 2m a31 a32 a33 a3m A [1] an1 an2 an3 anm In general the number of rows may be different from the number of columns. Sometimes the matrix is written as A(n x m) to show its size. (Size is defined as the number of rows and the number of columns.) A matrix that has the number of rows equal to the number of columns is called a square matrix. Matrices are used to represent physical quantities that have more than one number. These are usually used for engineering systems such as structures or networks in which we represent a collection of numbers, such as the individual stiffness of the members of a structure, as a single symbol known as a stiffness matrix. Networks of pipes, circuits, traffic streets, and the like may be represented by a connectivity matrix which indicates which pair of nodes in the matrix are directly joined to each other. The use of matrix notation and formulae for matrices leads to important analytical results. Students taking a vibrations course learn that a matrix property 1 Kreyszig, Advanced Engineering Mathematics (9th edition), Wiley, 2006, Chapter 7. Jacaranda Hall Room 3314 Mail Code Phone: 818.677.6448 Email: [email protected] 8348 Fax: 818.677.7062 Matrix Introduction L. S. Caretto, March 24, 2014 Page 2 knows as its eigenvalues represents the fundamental vibration frequencies in a mechanical system. Two matrices can be added or subtracted if both matrices have the same size. If we define a matrix, C, as the sum (or difference) of two matrices, A and B, we can write this sum (or difference) in terms of the matrices as follows. C A B (possible only if A and B havethe same size) [2] The components of the C matrix are simply the sum (or difference) of the components of the two matrices being added (or subtracted). Thus for the matrix sum (or difference) shown in equation [2], the components of C are give by the following equation. C A B cij aij bij (i 1,n; j 1,m) [3] The product of a matrix, A, with a single number, x, yields a second matrix whose size is the same as that of matrix A. Each component of the new matrix is the component of the original matrix, aij, multiplied by the number x. The number x in this case is usually called a scalar to distinguish it from a matrix or a matrix component. B xA if bij xaij (i 1,n; j 1,m) [4] We define two special matrices, the null matrix, 0, and the identity matrix, I. The null matrix is an arbitrary size matrix in which all the elements are zero. The identity matrix is a square matrix in which all the diagonal terms are 1 and the off-diagonal terms are zero. These matrices are sometimes written as 0(m x n) or In to specify a particular size for the null or identity matrix. The null matrix and the identity matrix are shown below. 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 I [5] 0 0 0 0 0 0 0 1 A matrix that has the same pattern as the identity matrix, but has terms other than ones on its principal diagonal is called a diagonal matrix. The general term for such a matrix is diδij, where di is the diagonal term for row i and δij is the Kronecker delta; the latter is defined such that δij = 0 unless i = j, in which case δij = 1. A diagonal matrix is sometimes represented in the following form: D = diag(d1, d2, d3,…,dn); this says that D is a diagonal matrix whose diagonal components are given by di We call the diagonal for which the row index is the same as the column index, the main or principal diagonal. Algorithms in the numerical analysis of differential equations lead to matrices whose nonzero terms lie along diagonals. For such a matrix, all the nonzero terms may be represented by symbols like ai,i-k or ai,i+k. Diagonals with subscripts ai,i-k or ai,i+k are said to lie, respectively, below or above the main diagonal. Matrix Introduction L. S. Caretto, March 24, 2014 Page 3 If the n rows and m columns in a matrix, A, are interchanged, we will have a new matrix, B, with m rows and n columns. The matrix B is said to be the transpose of A, written as AT. T B A if bij a ji [i 1,n; j 1,m;A is (n x m);B is (m x n).] [6] An example of an original A matrix and its transpose is shown below. 3 14 3 12 6 T A A 12 2 [7] 14 2 0 6 0 The transpose of a product of matrices equals the product of the transposes of individual matrices, with the order reversed. That is, T T T T T T T T (AB) B A (ABC) C B A (ABCD) [8] Matrices with only one row are called row matrices; matrices with only one column are called column matrices.2 Although we can write the elements of such matrices with two subscripts, the subscript of one for the single row or the single column is usually not included. The examples below for the row matrix, r, and the column matrix, c, show two possible forms for the subscripts. In each case, the second matrix has the commonly used notation. When row and column matrices are used in formulas that have two matrix subscripts, the first form of the matrices shown below are implicitly used to give the second subscript for the equation. c11 c1 c c 21 2 r r11 r12 r13 r1m c c c 31 3 [9] r r r r 1 2 3 m cn1 cn The transpose of a column matrix is a row matrix; the transpose of a row matrix is a column matrix. This is sometimes used to write a column matrix in the middle of text by saying, for example, that c = [1 3 -4 5]T. Matrix Multiplication The definition of matrix multiplication seems unusual when encountered for the first time. However, it has its origins in the treatment of linear equations. For a simple example, we consider three two-dimensional coordinate systems. The coordinates in the first system are x1 2 Row and column matrices are called row vectors or column vectors when they are used to represent the components of a vector. In these notes we will use upper case boldface letters such as A and B to represent matrices with more than one row or more than one column; we will use lower case boldface letters such as a or b to represent matrices with only one row or only one column. We will generally refer to these matrices as vectors. Matrix Introduction L. S. Caretto, March 24, 2014 Page 4 and x2. The coordinates for the second system are y1 and y2. The third system has coordinates z1 and z2. Each coordinate system is related by a coordinate transformation given by the following relations. y1 a11x1 a12x2 z1 b11y1 b12y2 [10] y2 a21x1 a22x2 z2 b21y1 b22y2 We can obtain a relationship between the z coordinate system and the x coordinate system by combining the various components of equation [10] to eliminate the yi coordinates as follows. z1 b11[a11x1 a12x2 ] b12[a21x1 a22x2 ] [11] z2 b21[a11x1 a12x2 ] b22[a21x1 a22x2 ] We can rearrange these terms to obtain a set of equations similar to those in equation [10] that relates the z coordinate system to the x coordinate system. z1 [b11a11 b12a21]x1 [b11a12 b12a22]x2 c11x1 c12x2 [12] z2 [b21a11 b22a21]x1 [b21a12 b22a22]x2 c21x1 c22x2 We see that the coefficients cij, for the new transformation are related to the coefficients for the previous transformations as follows. c11 [b11a11 b12a21] c12 [b11a12 b12a22] [13] c21 [b21a11 b22a21] c22 [b21a12 b22a22] There is a general form for each cij coefficient in equation [13].