Matrix representation of a linear map As before, let e i = (0,..., 0, 1, 0,..., 0) T, with 1 in the i th place and 0 elsewhere, be standard basis vectors. Given linear map f : R n R m we get n column vectors (of size m) viz., f (e 1 ),..., f (e n ). Place them side by side., Thus if f (e j ) = (f 1j, f 2j,..., f mj ) T, then we obtain an array of the form M f = f 11 f 12... f 1n f 21 f 22... f 2n.. f m1 f m2... f mn. Such an array is called a matrix with m rows and n columns or a matrix of size m n. In short, we write M f = (f ij ). We call M f to be the matrix associated with the linear map f : R n R m. 12/45
13/45 If we let Mat m n (R), or simply, M m,n, denote the set of all m n matrices with entries in R, then we obtain: M : L(n, m) M m,n f M f The map M is a one-to-one correspondence (i.e., one-one and onto map) between the set of all linear maps from R n to R m and the set of all m n matrices with entries in R. Note: Two matrices are equal if their sizes are the same and corresponding entries are the same. M is one-one (or injective), means M f = M g for some f, g L(n, m) f = g, whereas M is onto (or surjective) means that A Mat m n (R) A = M f for some f L(n, m).
13/45 If we let Mat m n (R), or simply, M m,n, denote the set of all m n matrices with entries in R, then we obtain: M : L(n, m) M m,n f M f The map M is a one-to-one correspondence (i.e., one-one and onto map) between the set of all linear maps from R n to R m and the set of all m n matrices with entries in R. Note: Two matrices are equal if their sizes are the same and corresponding entries are the same. M is one-one (or injective), means M f = M g for some f, g L(n, m) f = g, whereas M is onto (or surjective) means that A Mat m n (R) A = M f for some f L(n, m).
13/45 If we let Mat m n (R), or simply, M m,n, denote the set of all m n matrices with entries in R, then we obtain: M : L(n, m) M m,n f M f The map M is a one-to-one correspondence (i.e., one-one and onto map) between the set of all linear maps from R n to R m and the set of all m n matrices with entries in R. Note: Two matrices are equal if their sizes are the same and corresponding entries are the same. M is one-one (or injective), means M f = M g for some f, g L(n, m) f = g, whereas M is onto (or surjective) means that A Mat m n (R) A = M f for some f L(n, m).
13/45 If we let Mat m n (R), or simply, M m,n, denote the set of all m n matrices with entries in R, then we obtain: M : L(n, m) M m,n f M f The map M is a one-to-one correspondence (i.e., one-one and onto map) between the set of all linear maps from R n to R m and the set of all m n matrices with entries in R. Note: Two matrices are equal if their sizes are the same and corresponding entries are the same. M is one-one (or injective), means M f = M g for some f, g L(n, m) f = g, whereas M is onto (or surjective) means that A Mat m n (R) A = M f for some f L(n, m).
If we let Mat m n (R), or simply, M m,n, denote the set of all m n matrices with entries in R, then we obtain: M : L(n, m) M m,n f M f The map M is a one-to-one correspondence (i.e., one-one and onto map) between the set of all linear maps from R n to R m and the set of all m n matrices with entries in R. Note: Two matrices are equal if their sizes are the same and corresponding entries are the same. M is one-one (or injective), means M f = M g for some f, g L(n, m) f = g, whereas M is onto (or surjective) means that A Mat m n (R) A = M f for some f L(n, m). M preserves addition and scalar multiplication, i.e., M f +g = M f +M g and M αf = αm f, f, g L(n, m), α R. 13/45
Examples: 14/45
14/45 Examples: 1. For the identity map id : R n R n, 1 0... 0 0 1... 0 M id = I = I n :=.. 0 0... 1
14/45 Examples: 1. For the identity map id : R n R n, 1 0... 0 0 1... 0 M id = I = I n :=.. = (δ ij) 0 0... 1 wehre δ ij is the Kronecker delta defined by δ ij = 1 if i = j and δ ij = 0, if i j.
14/45 Examples: 1. For the identity map id : R n R n, 1 0... 0 0 1... 0 M id = I = I n :=.. = (δ ij) 0 0... 1 wehre δ ij is the Kronecker delta defined by δ ij = 1 if i = j and δ ij = 0, if i j. 2. The matrix of the linear map T : R 2 R 2 which interchanges coordinates, is
14/45 Examples: 1. For the identity map id : R n R n, 1 0... 0 0 1... 0 M id = I = I n :=.. = (δ ij) 0 0... 1 wehre δ ij is the Kronecker delta defined by δ ij = 1 if i = j and δ ij = 0, if i j. 2. The matrix of the linear map T : R 2 ( R 2 which ) 0 1 interchanges coordinates, is M T =. 1 0
14/45 Examples: 1. For the identity map id : R n R n, 1 0... 0 0 1... 0 M id = I = I n :=.. = (δ ij) 0 0... 1 wehre δ ij is the Kronecker delta defined by δ ij = 1 if i = j and δ ij = 0, if i j. 2. The matrix of the linear map T : R 2 ( R 2 which ) 0 1 interchanges coordinates, is M T =. 1 0 3. For the linear map µ α : R n R n corresponding to multiplication by a fixed scalar α, the associated matrix is
14/45 Examples: 1. For the identity map id : R n R n, 1 0... 0 0 1... 0 M id = I = I n :=.. = (δ ij) 0 0... 1 wehre δ ij is the Kronecker delta defined by δ ij = 1 if i = j and δ ij = 0, if i j. 2. The matrix of the linear map T : R 2 ( R 2 which ) 0 1 interchanges coordinates, is M T =. 1 0 3. For the linear map µ α : R n R n corresponding to multiplication by a fixed scalar α, the associated matrix is the scalar matrix diag(α,..., α) := (αδ ij )
15/45 4. Rotation of the plane by an angle θ defines a linear map R θ : R 2 R 2 (Linearity of R θ can be shown by the law of congruent triangles or by finding a formula for R θ (x, y) using polar coordinates and trigonometric identities). The matrix of R θ is about the ( ) cos θ sin θ M Rθ = sin θ cos θ
15/45 4. Rotation of the plane by an angle θ defines a linear map R θ : R 2 R 2 (Linearity of R θ can be shown by the law of congruent triangles or by finding a formula for R θ (x, y) using polar coordinates and trigonometric identities). The matrix of R θ is about the ( ) cos θ sin θ M Rθ = sin θ cos θ 5. The inclusion map R 2 R 3 that sends (x, y) R 2 to (x, y, 0) R 3 is clearly a linear map and its matrix is
15/45 4. Rotation of the plane by an angle θ defines a linear map R θ : R 2 R 2 (Linearity of R θ can be shown by the law of congruent triangles or by finding a formula for R θ (x, y) using polar coordinates and trigonometric identities). The matrix of R θ is about the ( ) cos θ sin θ M Rθ = sin θ cos θ 5. The inclusion map R 2 R 3 that sends (x, y) R 2 to (x, y, 0) R 3 is clearly a linear map and its matrix is 1 0 0 1 0 0 In a similar way, we can write down the (n + t) n matrix corresponding to the inclusion map R n R n+t.
Operations on matrices 16/45 Set of all matrices of size m n is denoted by M m,n
Operations on matrices 16/45 Set of all matrices of size m n is denoted by M m,n As before, for A = (a ij ), B = (b ij ) M m,n and α R, A + B := (a ij + b ij ); αa := (αa ij ) Matrix addition and scalar multiplicaion satisfies the usual properties. The zero element is the zero matrix 0, all of whose entries are 0 and the negative of a matrix A = (a ij ) is the matrix A = ( a ij ).
Operations on matrices 16/45 Set of all matrices of size m n is denoted by M m,n As before, for A = (a ij ), B = (b ij ) M m,n and α R, A + B := (a ij + b ij ); αa := (αa ij ) Matrix addition and scalar multiplicaion satisfies the usual properties. The zero element is the zero matrix 0, all of whose entries are 0 and the negative of a matrix A = (a ij ) is the matrix A = ( a ij ).
Operations on matrices 16/45 Set of all matrices of size m n is denoted by M m,n As before, for A = (a ij ), B = (b ij ) M m,n and α R, A + B := (a ij + b ij ); αa := (αa ij ) Matrix addition and scalar multiplicaion satisfies the usual properties. The zero element is the zero matrix 0, all of whose entries are 0 and the negative of a matrix A = (a ij ) is the matrix A = ( a ij ). Transpose operation introduced earlier can be extended to all matrices A T := (b ij ) M n,m where b ij := a ji Note that (αa + βb) T = αa T + βb T for any α, β R.
Operations on matrices 16/45 Set of all matrices of size m n is denoted by M m,n As before, for A = (a ij ), B = (b ij ) M m,n and α R, A + B := (a ij + b ij ); αa := (αa ij ) Matrix addition and scalar multiplicaion satisfies the usual properties. The zero element is the zero matrix 0, all of whose entries are 0 and the negative of a matrix A = (a ij ) is the matrix A = ( a ij ). Transpose operation introduced earlier can be extended to all matrices A T := (b ij ) M n,m where b ij := a ji Note that (αa + βb) T = αa T + βb T for any α, β R.
Operations on matrices Set of all matrices of size m n is denoted by M m,n As before, for A = (a ij ), B = (b ij ) M m,n and α R, A + B := (a ij + b ij ); αa := (αa ij ) Matrix addition and scalar multiplicaion satisfies the usual properties. The zero element is the zero matrix 0, all of whose entries are 0 and the negative of a matrix A = (a ij ) is the matrix A = ( a ij ). Transpose operation introduced earlier can be extended to all matrices A T := (b ij ) M n,m where b ij := a ji Note that (αa + βb) T = αa T + βb T for any α, β R. Products of linear maps is not linear (in fact not even defined), in general. But composites of linear maps are linear. How does this relate to matrices? 16/45
17/45 Composition of Linear Maps and Matrix Multiplication Question: Let f : R n R m, g : R p R n be linear maps. If A := M f and B := M g then M f g =?
Composition of Linear Maps and Matrix Multiplication Question: Let f : R n R m, g : R p R n be linear maps. If A := M f and B := M g then M f g =? f g is a map of R p to R m. For 1 j p, ( n ) (f g)(e j ) = f (g(e j )) = f b kj e k = = n b kj f (e k ) = k=1 k=1 ( n m ) b kj a ik e i k=1 ( m n ) a ik b kj e i i=1 k=1 Thus M f g = C, where C = (c ij ) is the m p matrix whose (i, j) th entry is c ij = n k=1 a ikb kj. We call C the product of the m n matrix A and the n p matrix B, and write C = AB. i=1 17/45
Basic Properties of Matrix Multiplication 18/45 The following properties are readily derived from the corresponding properties of linear maps and the one-to -one correspondence between linear maps and matrices. Assume that the matrices A, B, C are of appropriate sizes so that all relevant products are defined. 1. Associativity: A(BC) = (AB)C.
Basic Properties of Matrix Multiplication 18/45 The following properties are readily derived from the corresponding properties of linear maps and the one-to -one correspondence between linear maps and matrices. Assume that the matrices A, B, C are of appropriate sizes so that all relevant products are defined. 1. Associativity: A(BC) = (AB)C. 2. Right and Left Distributivity: A(B + C) = AB + AC, (B + C)A = BA + CA
Basic Properties of Matrix Multiplication The following properties are readily derived from the corresponding properties of linear maps and the one-to -one correspondence between linear maps and matrices. Assume that the matrices A, B, C are of appropriate sizes so that all relevant products are defined. 1. Associativity: A(BC) = (AB)C. 2. Right and Left Distributivity: A(B + C) = AB + AC, (B + C)A = BA + CA 3. Multiplicative identity: For any A M m,n, AI n = A and I m A = A In particular, if A is a n n matrix, then AI n = A = I n A. Remark: Matrix multiplication is not commutative in general, i.e., AB need not equal BA even when both the products are defined. Exercise: Find examples! 18/45
Basic Properties of Matrix Multiplication The following properties are readily derived from the corresponding properties of linear maps and the one-to -one correspondence between linear maps and matrices. Assume that the matrices A, B, C are of appropriate sizes so that all relevant products are defined. 1. Associativity: A(BC) = (AB)C. 2. Right and Left Distributivity: A(B + C) = AB + AC, (B + C)A = BA + CA 3. Multiplicative identity: For any A M m,n, AI n = A and I m A = A In particular, if A is a n n matrix, then AI n = A = I n A. 4. Transpose of Product: (AB) T = B T A T. Remark: Matrix multiplication is not commutative in general, i.e., AB need not equal BA even when both the products are defined. Exercise: Find examples! 18/45
Invertible Maps 19/45 Recall the set-theoretic definition of invertible functions. Let X, Y be sets. A function f : X Y is said to be invertible if there exists g : Y X satisfying g f = id X and f g = id Y. In this case the function g is unique (check!) and it is called the inverse of f and denoted by f 1.
Invertible Maps Recall the set-theoretic definition of invertible functions. Let X, Y be sets. A function f : X Y is said to be invertible if there exists g : Y X satisfying g f = id X and f g = id Y. In this case the function g is unique (check!) and it is called the inverse of f and denoted by f 1. For any function f : X Y, f is invertible f is one-one and onto. If f : R n R n is an invertible linear map, then f 1 is linear. [To see this, let y 1, y 2 R n. Then there are x 1, x 2 R n such that f (x i ) = y i, i.e., x i = f 1 (y i ) for i = 1, 2. Thus f 1 (y 1 + y 2 ) = f 1 (f (x 1 ) + f (x 2 )) and using the linearity of f, we find that this is equal to f 1 (f (x 1 + x 2 )) = x 1 + x 2 = f 1 (y 1 ) + f 1 (y 2 ). Similarly f 1 preserves scalar multiplication. 19/45
Invertible Matrices 20/45 A square matrix A of size n n is said to be invertible if there exists an n n matrix B such that AB = BA = I n. If such a matrix B exists, then it is unique.
Invertible Matrices 20/45 A square matrix A of size n n is said to be invertible if there exists an n n matrix B such that AB = BA = I n. If such a matrix B exists, then it is unique. Indeed, if C is another matrix such that CA = AC = I n, then C = CI n = C(AB) = (CA)B = I n B = B. We thus call B to be the inverse of A and denote it by A 1. Note that if f A, f B : R n R n are the linear maps associated with A, B resp., then B = A 1 implies that f B = f 1 A.
Invertible Matrices 20/45 A square matrix A of size n n is said to be invertible if there exists an n n matrix B such that AB = BA = I n. If such a matrix B exists, then it is unique. Indeed, if C is another matrix such that CA = AC = I n, then C = CI n = C(AB) = (CA)B = I n B = B. We thus call B to be the inverse of A and denote it by A 1. Note that if f A, f B : R n R n are the linear maps associated with A, B resp., then B = A 1 implies that f B = f 1 A. Basic Properties/Examples: If A 1, A 2 are invertible, then so is A 1 A 2.
Invertible Matrices 20/45 A square matrix A of size n n is said to be invertible if there exists an n n matrix B such that AB = BA = I n. If such a matrix B exists, then it is unique. Indeed, if C is another matrix such that CA = AC = I n, then C = CI n = C(AB) = (CA)B = I n B = B. We thus call B to be the inverse of A and denote it by A 1. Note that if f A, f B : R n R n are the linear maps associated with A, B resp., then B = A 1 implies that f B = f 1 A. Basic Properties/Examples: If A 1, A 2 are invertible, then so is A 1 A 2. What is its inverse?
Invertible Matrices 20/45 A square matrix A of size n n is said to be invertible if there exists an n n matrix B such that AB = BA = I n. If such a matrix B exists, then it is unique. Indeed, if C is another matrix such that CA = AC = I n, then C = CI n = C(AB) = (CA)B = I n B = B. We thus call B to be the inverse of A and denote it by A 1. Note that if f A, f B : R n R n are the linear maps associated with A, B resp., then B = A 1 implies that f B = f 1 A. Basic Properties/Examples: If A 1, A 2 are invertible, then so is A 1 A 2. What is its inverse? Ans: (A 1 A 2 ) 1 = A 1 2 A 1 1.
Invertible Matrices A square matrix A of size n n is said to be invertible if there exists an n n matrix B such that AB = BA = I n. If such a matrix B exists, then it is unique. Indeed, if C is another matrix such that CA = AC = I n, then C = CI n = C(AB) = (CA)B = I n B = B. We thus call B to be the inverse of A and denote it by A 1. Note that if f A, f B : R n R n are the linear maps associated with A, B resp., then B = A 1 implies that f B = f 1 A. Basic Properties/Examples: If A 1, A 2 are invertible, then so is A 1 A 2. What is its inverse? Ans: (A 1 A 2 ) 1 = A 1 2 A 1 1. Clearly I n and more generally, any diagonal matrix diag(a 1, a 2,..., a n ) with a i 0 for all i is invertible; diag(a 1,..., a n ) 1 = diag(1/a 1,..., 1/a n ). 20/45
Elementary Matrices 21/45 Consider a m m matrix E ij whose (i, j) th entry is 1 and all other entries are 0.
Elementary Matrices 21/45 Consider a m m matrix E ij whose (i, j) th entry is 1 and all other entries are 0. If we multiply a m n matrix A by E ij on the left, then what we get is a m n matrix whose i th row is equal to the j th row of A and all other rows are zero.
Elementary Matrices 21/45 Consider a m m matrix E ij whose (i, j) th entry is 1 and all other entries are 0. If we multiply a m n matrix A by E ij on the left, then what we get is a m n matrix whose i th row is equal to the j th row of A and all other rows are zero. In particular, if i j, then E ij E ij = 0 and so for any α, (I + αe ij )(I αe ij ) = I + αe ij αe ij α 2 E ij E ij = I.
Elementary Matrices 21/45 Consider a m m matrix E ij whose (i, j) th entry is 1 and all other entries are 0. If we multiply a m n matrix A by E ij on the left, then what we get is a m n matrix whose i th row is equal to the j th row of A and all other rows are zero. In particular, if i j, then E ij E ij = 0 and so for any α, (I + αe ij )(I αe ij ) = I + αe ij αe ij α 2 E ij E ij = I. On the other hand, if i = j, then (I + αe ii ) = diag(1,..., 1, 1 + α, 1,..., 1) and this is invertible if α 1.
Elementary Matrices Consider a m m matrix E ij whose (i, j) th entry is 1 and all other entries are 0. If we multiply a m n matrix A by E ij on the left, then what we get is a m n matrix whose i th row is equal to the j th row of A and all other rows are zero. In particular, if i j, then E ij E ij = 0 and so for any α, (I + αe ij )(I αe ij ) = I + αe ij αe ij α 2 E ij E ij = I. On the other hand, if i = j, then (I + αe ii ) = diag(1,..., 1, 1 + α, 1,..., 1) and this is invertible if α 1. Matrices of the type I + αe ij, with α R and i j or of the type I + αe ii with α 1 provide simple examples of invertible matrices whose inverse is of a similar type. These are two among 3 possible types of elementary matrices. 21/45
The third remaining type of elementary matrix and its basic propery is described in the following easy exercise. 22/45 Exercise: Given any i j, show that the square matrix T ij := I + E ij + E ji E ii E jj is precisely the matrix obtained from the identity matrix by interchanging the i th and j th rows. Also show that T ij T ij = I and deduce that T ij is invertible and T 1 ij = T ij. A square matrix is said to be elementary if it of the type T ij (i j) or I + αe ii (α 1) or I + αe ij (i j). Thanks to the discussion in the last slide and the exercise above, we have the following result.
The third remaining type of elementary matrix and its basic propery is described in the following easy exercise. 22/45 Exercise: Given any i j, show that the square matrix T ij := I + E ij + E ji E ii E jj is precisely the matrix obtained from the identity matrix by interchanging the i th and j th rows. Also show that T ij T ij = I and deduce that T ij is invertible and T 1 ij = T ij. A square matrix is said to be elementary if it of the type T ij (i j) or I + αe ii (α 1) or I + αe ij (i j). Thanks to the discussion in the last slide and the exercise above, we have the following result. Theorem Every elementary matrix is invertible and its inverse is an elementary matrix of the same type.