ME 404 ADVANCE MATHEMATICS FOR ME Engr. Zedric Rei C. Canicon Lecturer ©2023 1 Batangas State University Matrices: Review, Operations & Vectors ©2022 Batangas State University Matrix Matrix is a rectangular array of real numbers arranged in “m” rows and “n” columns. The term “matrix” was introduced by the English mathematician James Joseph Sylvester (1814- 1897) in 1850. The size of a matrix is determined by the number of rows and columns. The expression "m x n" is the dimension or order of the matrix. If the matrix has only one column, it is called a column matrix and if it has only one row, it is called a row matrix. The following is a 3 x 3 matrix or square matrix (i.e. 3 rows and 3 columns). ©2023 Batangas State University 3 Engr. Zedric Rei C. Canicon Matrix A matrix is called by m x n matrix where m is designated as row and n as column (note: rows always come first). The size of matrix is determined by the m x n matrix. ©2023 Batangas State University 4 Engr. Zedric Rei C. Canicon Matrix A matrix is a rectangular array of numbers or functions enclosed in brackets. The numbers (or functions) are called entries or, less commonly, elements of the matrix. ©2023 Batangas State University 5 Engr. Zedric Rei C. Canicon Matrix 1 23 55 −6 1/2 3 4 12 −7 ©2023 Batangas State University 6 Engr. Zedric Rei C. Canicon Matrix 1 23 55 −6 1/2 3 4 12 −7 SQUARE MATRIX ©2023 Batangas State University 7 Engr. Zedric Rei C. Canicon Matrix 1 23 55 −6 1/2 3 4 12 −7 LEADING ENTRY ©2023 Batangas State University 8 Engr. Zedric Rei C. Canicon Matrix 1 23 55 −6 1/2 3 4 12 −7 DIAGONAL ENTRIES ©2023 Batangas State University 9 Engr. Zedric Rei C. Canicon Matrix 1 0 55 −6 1/2 3 0 0 −7 LOWER TRIANGULAR MATRIX ©2023 Batangas State University 10 Engr. Zedric Rei C. Canicon Matrix 1 23 0 −6 0 0 4 12 −7 UPPER TRIANGULAR MATRIX ©2023 Batangas State University 11 Engr. Zedric Rei C. Canicon Vectors A vector is a matrix with only one row or column. Its entries are called the components of the vector. A row vector is of the form A column vector is of the form ©2023 Batangas State University 12 Engr. Zedric Rei C. Canicon Matrix 1 0 0 −6 0 0 0 0 −7 DIAGONAL MATRIX ©2023 Batangas State University 13 Engr. Zedric Rei C. Canicon Operations on Matrix Addition/ Subtraction of Matrices Matrices having the same number of rows and columns are added by adding corresponding elements. Thus, for all m x n matrices A and B as example, their sum π΄ + π΅ is a matrix πΆ = πππ such that πππ + πππ = πππ , for π = 1,2, … , π and π = 1,2, … , π. Since the sum of A and B is itself an m x n matrix, it is said that the set of all m x n matrices is closed under matrix addition. Addition of matrices of different sizes is undefined. ©2023 Batangas State University 14 Engr. Zedric Rei C. Canicon Operations on Matrix Example 1: If π΄ = −4 0 6 3 5 and π΅ = 1 2 3 −1 0 , what is the value of π΄ + π΅ ? 1 0 Solution: π΄+π΅ = −4 + 5 6 + (−1) 3 + 0 0+3 1+1 2+0 π π π π¨+π©= π π π ©2023 Batangas State University 15 Engr. Zedric Rei C. Canicon Operations on Matrix Example 2: 16 21 −3 5 −1 0 If πΆ = 8 −10 6 and π· = 3 1 0 , what is the value of πΆ + π· ? 16 10 2 8 −7 −7 Solution: 16 + 5 21 + −1 −3 + 0 πΆ+π· = 8 + 3 −10 + 1 6+0 16 + 8 10 + (−7) 2 + (−7) ππ ππ −π πͺ + π« = ππ −π π ππ π −π ©2023 Batangas State University 16 Engr. Zedric Rei C. Canicon Operations on Matrix Example 3: −4 6 If π΄ = 0 1 5 3 and π· = 3 2 8 −1 0 1 0 , what is the value of π΄ + π· ? −7 −7 Solution: Matrices to be solved do not have the same order/size of matrix that is why the operation cannot be performed. ©2023 Batangas State University 17 Engr. Zedric Rei C. Canicon Operations on Matrix Scalar Multiplication of Matrices The product of any π π₯ π matrix A = πππ and any scalar c (number c) is written cA and is the m x n matrix cA = ππππ obtained by multiplying each entry of A by c. -1A is simply written as –A and is called the negative of A. Similarly, (-k)A is written as –kA. Also, A+(-B) is written as A-B and is called the difference of A and B and must have the same size. ©2023 Batangas State University 18 Engr. Zedric Rei C. Canicon Operations on Matrix Example 3: 2.7 −1.8 If π΄ = 0 0.9 , find the value of the following: 9.0 −4.5 a. -A b. 10 π΄ 9 c. 0A Solution: 2.7 −1.8 −2.7 1.8 a. π΄ = 0 0.9 then− π΄ = 0 −0.9 9.0 −4.5 −9.0 4.5 ©2023 Batangas State University 19 Engr. Zedric Rei C. Canicon Operations on Matrix Example 3: 2.7 −1.8 If π΄ = 0 0.9 , find the value of the following: 9.0 −4.5 a. -A b. 10 π΄ 9 c. 0A Solution: 2.7 −1.8 10 b. π΄ = 0 then π΄= 0.9 9 9.0 −4.5 10 × 2.7 9 10 ×0 9 10 × 9.0 9 10 × −1.8 9 10 ππ × 0.9 . π¨ 9 π 10 × −4.5 9 ©2023 Batangas State University 20 Engr. Zedric Rei C. Canicon π −π = π π ππ −π Operations on Matrix Example 3: 2.7 −1.8 If π΄ = 0 0.9 , find the value of the following: 9.0 −4.5 a. -A b. 10 π΄ 9 Solution: 2.7 −1.8 π a. π΄ = 0 0.9 then π π¨ = π 9.0 −4.5 π c. 0A π π π ©2023 Batangas State University 21 Engr. Zedric Rei C. Canicon Operations on Matrix Rules for Matrix Addition and Scalar Multiplication From the familiar laws for the addition of numbers, we obtain similar laws for the addition of matrices of the same size m x n, namely, Here 0 denotes the zero matrix of (size m x n), that is, the m x n matrix with all entries zero. If m=1 or n=1, this a vector, called a zero vector. ©2023 Batangas State University 22 Engr. Zedric Rei C. Canicon Operations on Matrix Hence matrix addition is commutative and associative. Similarly, for scalar multiplication we obtain rules ©2023 Batangas State University 23 Engr. Zedric Rei C. Canicon Operations on Matrix Matrix Multiplication The product C = AB (in this order) of an m x n matrix A = πππ multiplied by an r x p matrix B = πππ is defined if and only if r = n and is then the m x p matrix C = πππ with entries ©2023 Batangas State University 24 Engr. Zedric Rei C. Canicon Operations on Matrix Matrix Multiplication The condition r = n means that the second factor, B, must have as many rows as the first factor has columns, namely n. A diagram of sizes that shows when matrix multiplication is possible is as follows: ©2023 Batangas State University 25 Engr. Zedric Rei C. Canicon Operations on Matrix The entry πππ is obtained by multiplying each entry in the jth row of A by the corresponding entry in the kth column of B and then adding these n products. For instance, π21 = π21 π11 + π22 π11 + β― + π2π ππ1 , and so on. One calls this briefly a multiplication of rows into columns. For n = 3, this is illustrated by ©2023 Batangas State University 26 Engr. Zedric Rei C. Canicon Operations on Matrix Example 1: Multiplication of Matrix and Vector Find Matrix AB and BA. 4 2 π΄= 1 8 3 π΅= 5 ©2023 Batangas State University 27 Engr. Zedric Rei C. Canicon Operations on Matrix Example 2: Find Matrix AB as A x B = AB 3 5 −1 π΄= 4 0 2 −6 −3 2 2 −2 3 π΅= 5 0 7 9 −4 1 ©2023 Batangas State University 28 Engr. Zedric Rei C. Canicon 1 8 1 Operations on Matrix Matrix Multiplication Rules provided A, B, and C are such that the expressions on the left are defined; here, k is any scalar. (b) is called the associative law. (c) and (d) are called the distributive laws. ©2023 Batangas State University 29 Engr. Zedric Rei C. Canicon Operations on Matrix Transpose Matrix If matrix A is reflected in its main diagonal, so that all rows become columns and all columns become rows without changing their relative order of entries in the rows and columns, the result is a transpose matrix, AT. ©2023 Batangas State University 30 Engr. Zedric Rei C. Canicon Operations on Matrix Example 1: ©2023 Batangas State University 31 Engr. Zedric Rei C. Canicon Operations on Matrix Example 2: ©2023 Batangas State University 32 Engr. Zedric Rei C. Canicon Operations on Matrix Example 3: Find the transpose of Matrix Z. 5 16 33 21 π= −2 −50 8 0.5 15 4 0 −4/5 Solution: 5 π π = 16 15 33 21 4 −2 8 −50 0.5 0 −4/5 ©2023 Batangas State University 33 Engr. Zedric Rei C. Canicon Operations on Matrix Rules for Transposition: ©2023 Batangas State University 34 Engr. Zedric Rei C. Canicon Operations on Matrix Example: Application of Matrix Multiplication Supercomp Ltd produces two computer models PC1086 and PC1186. The matrix A shows the cost per computer (in thousands of dollars) and B the production figures for the year 2010 (in multiples of 10,000 units.) Find a matrix C that shows the shareholders the cost per quarter (in millions of dollars) for raw material, labor, and miscellaneous. ©2023 Batangas State University 35 Engr. Zedric Rei C. Canicon Operations on Matrix Special Matrices Symmetric matrices are square matrices whose transpose equals the matrix itself. Skew-symmetric matrices are square matrices whose transpose equals minus the matrix. ©2023 Batangas State University 36 Engr. Zedric Rei C. Canicon Operations on Matrix ©2023 Batangas State University 37 Engr. Zedric Rei C. Canicon Operations on Matrix ©2023 Batangas State University 38 Engr. Zedric Rei C. Canicon Operations on Matrix Special Matrices Scalar matrix is a diagonal matrix whose elements main diagonal are the same. 3 0 0 3 0 0 0 0 3 ©2023 Batangas State University 39 Engr. Zedric Rei C. Canicon Operations on Matrix Special Matrices Identity matrix is a diagonal matrix whose elements main diagonal are all 1. 1 0 0 1 0 0 0 0 1 ©2023 Batangas State University 40 Engr. Zedric Rei C. Canicon Operations on Matrix Special Matrices Trace of matrix is the sum of the entries of main diagonal of a square matrix. 1 23 4 55 −6 12 1/2 3 −7 ©2023 Batangas State University 41 Engr. Zedric Rei C. Canicon Operations on Matrix Given with matrices, solve the following operations. 1 π = 55 1/2 1 πΈ= 3 a. ππΈ 23 4 −6 12 3 −7 7 0 5 0 7 0 5 0 π·= −4 −7 −2 −1/2 15 3 1 12 π= 3 −8 0 1 b. 3π· − 2 π π c.πΈπ π ©2023 Batangas State University 42 Engr. Zedric Rei C. Canicon