Chapter 2 Matrices Gareth Williams J & B, 滄海書局
2.1 Addition, Scalar Multiplication, and Multiplication of Matrices • 2.2 Properties of Matrix Operations • 2.3 Symmetric Matrices • 2.4 Inverse of a Matrix and Cryptography • 2.5 Leontief Input-Output Model • 2.6 Markov Chains, Population Movements, and Genetics • 2.7 A Communication Model and Graph Relationships in Sociology
2.1 Addition, Scalar Multiplication, and Multiplication of Matrices Example 1 Determine the elements a12, a23, and a34 for the following matrix A. Given the main diagonal of A. Solution
Equality of Matrices Definition The matrices are equal if they are of the same size and if their corresponding elements are equal. Thus A = B if aij = bij.
Addition of Matrices Definition Let A and B be matrices of the same size. Their sumA + B is the matrix obtained by adding together the corresponding elements of A and B. The matrix A + B will be of the same size as A and B. If A and B are not of the same size, they cannot be added, and we say that the sum does not exist. Thus if C = A + B, then cij = aij+ bij.
Determine A + B, and A + C, if the sum exist. Example 2 Solution
Scalar Multiplication of Matrices Definition Let A be a matrix and c be a scalar. The scalar multiple of A by c, denoted cA, is the matrix obtained by multiplying every element of A by c. The matrix cA will be the same size as A.
Example 3 Solution
Negation and Subtraction Definition We now define subtraction of matrices in such a way that makes it compatible with addition, scalar multiplication, and negative. Let A – B = A + (–1)B
Negation and Subtraction Example Solution
Multiplication of Matrices Definition Let the number of columns in a matrix A be the same as the number of rows in a matrix B. The product AB then exists. The element in row i and column j of AB is obtained by multiplying the corresponding elements of row i of A and column j of B and adding the products. If the number of columns in A does not equal the number of row B, we say that the product does not exist.
Let C = AB, Example 6 Solution
A m r Size of a Product Matrix If A is an m r matrix and B is an r n matrix, then AB will be an m n matrix. B = AB r n m n
Example 7 If A is a 5 6 matrix and B is an 6 7 matrix. What is the size of the product of AB? Solution
Definition A zero matrix is a matrix in which all the elements are zeros. A diagonal matrix is a square matrix in which all the elements not on the main diagonal are zeros. An identity matrix is a diagonal matrix in which every diagonal element is 1.
Theorem 2.1 Let A be m n matrix and 0mn be the zero m n matrix. Let B be an n n square matrix. 0n and In be the zero and identity n n matrices. Then A + 0mn = 0mn + A = A B0n = 0nB = 0n BIn = InB = B Proof
Example 8 Solution
Matrix Notation and Systems of Equations A system of m linear equations in n variables as follows Let We can write the system of equations in the matrix form AX = B
Matrix Multiplication in Terms of Columns (a)Let A be an m×n matrix and B be an n×r matrix. Let the column of B be the matrices b1, b2, …, br, . Write B=[b1, b2, …, br]. Thus (b)Let A be an m×n matrix and B be an n×r matrix. Let the row of A be the matrices a1, a2, …, am, .
(1) (2) Partitioning of Matrices
2.2 Properties of Matrix Operations Theorem 2.2 Let A, B, and C be matrices and a, b, and c be scalars. Assume that the size of the matrices are such that the operations can be performed. Properties of Matrix Addition and scalar Multiplication 1. A + B = B + A Commutative property of addition 2. A + (B + C) = (A + B) + C Associative property of addition 3. A + 0 = 0 + A = A (where0 is the appropriate zero matrix) 4. c(A + B) = cA + cB Distributive property of addition 5. (a + b)C = aC + bC Distributive property of addition 6. (ab)C = a(bC)
Theorem 2.2 Proof
Theorem 2.2 Let A, B, and C be matrices and a, b, and c be scalars. Assume that the size of the matrices are such that the operations can be performed. Properties of Matrix Multiplication 1. A(BC) = (AB)C Associative property of multiplication 2. A(B + C) = AB + AC Distributive property of multiplication 3. (A + B)C = AC + BCDistributive property of multiplication 4. AIn = InA = A (whereIn is the appropriate identity matrix) 5. c(AB) = (cA)B = A(cB) Note: AB BA in general. Multiplication of matrices is not commutative.
Theorem 2.2 Proof
Example 1 Solution
Example 2 Solution
Example 3 By Example 2, compare the number of multiplications involved in the two ways (AB)C and A(BC) of computing the product ABC. Solution
Note If A is an m r matrix and B is r n matrix, the number of scalar multiplications involved in computing the product AB is mrn. If A is an m r matrix and B is r n matrix, the number of additions involved in computing the product AB is m(r-1)n.
Caution • In algebra we know that the following cancellation laws apply. • If ab = ac and a 0 then b = c. • If pq = 0 then p = 0 or q = 0. • However the corresponding results are not true for matrices. • AB = AC does not imply that B = C. • PQ = 0 does not imply that P = 0 or Q = 0.
Powers of Matrices Theorem 2.3 If A is an n n square matrix and r and s are nonnegative integers, then 1. ArAs = Ar+s. 2. (Ar)s = Ars. 3. A0 = In (by definition) Proof
Example 4 Solution
Example 5 Simplify the following matrix expression. Solution
2.3 Symmetric Matrices Definition The transpose of a matrix A, denoted At, is the matrix whose columns are the rows of the given matrix A.
Example 1 Solution
Theorem 2.4 Properties of Transpose Let A and B be matrices and c be a scalar. Assume that the sizes of the matrices are such that the operations can be performed. 1. (A + B)t = At + Bt Transpose of a sum 2. (cA)t = cAt Transpose of a scalar multiple 3. (AB)t = BtAt Transpose of a product 4. (At)t = A Proof
match match Definition A symmetric matrix is a matrix that is equal to its transpose.
Example 3 Let A and B be symmetric matrices of the same size. Prove that the product AB is symmetric if and only if AB = BA. *We have to show (a) if AB is symmetric, then AB = BA, and the converse, (b) AB = BA, then AB is symmetric. Proof (a) Let AB be symmetric, then AB= by definition of symmetric matrix = by the transpose of a product = since A and B are symmetric matrices (b) Let AB = BA, then (AB)t = by the transpose of a product = since A and B are symmetric matrices =
Definition Let A be a square matrix. The trace A, denoted tr(A) is the sum of the diagonal elements of A. Thus if A is an n n matrix. tr(A) = a11 + a22 + … + ann
Example 4 Determine the trace of the matrix Solution
Theorem 2.5 Properties of Trace Let A and B be matrices and c be a scalar. Assume that the sizes of the matrices are such that the operations can be performed. 1. tr(A + B) = tr(A) + tr(B) 2. tr(AB) = tr(BA) 3. tr(cA) = trc(A) 4. tr(At) = tr(A) Proof
Equality: Addition: Subtraction: Multiplication: Matrices with Complex Elements The element of a matrix may be complex numbers. A complex number is of the form z = a + bi Where a and b are real numbers and a is called the real part and b the imaginary part of z. Let be the complex numbers. The rules of arithmetic for complex numbers are as follows.
Conjugate of a Complex Number Definition The conjugate of a complex number z = a+bi is defined and written = a-bi
Consider the complex numbers Compute Example 5 Solution