TOPIC 1: MATRICES AND DETERMINANTS. 1. Matrices. Definition 1.1. A matrix
is a rectangular array of real numbers. A = . . . . a11 a12. ··· a1m a21.
TOPIC 1: MATRICES AND DETERMINANTS
1. Matrices Definition 1.1. A matrix is a rectangular array of a11 a12 a21 a22 A= . .. .. . an1
an2
real numbers · · · a1m · · · a2m .. . .. . . · · · anm
The matrix is said to be of order n × m if it has n rows and m columns. The set of matrices of order n × m will be denoted Mn×m . The element aij belongs to the ith row and to the jth column. Most often we will write in i=1,...,n abbreviated form A = (aij )j=1,...,m or even A = (aij ). The main or principal, diagonal of a matrix is the diagonal from the upper left– to the lower right–hand corner. A matrix isP square if n = m. The trace of a square matrix A is the sum of its n diagonal elements, trace (A) = i=1 aii . Definition 1.2. The identity matrix of order n is 1 0 ... 0 1 ... In = . . . .. .. .. 0 0 ...
0 0 .. .
.
1
The square matrix of order n with all its entries null is the null matrix, and will be denoted 0n . Definition 1.3. The transpose of a matrix A, denoted AT , is the matrix formed by interchanging the rows and columns of A a11 a21 · · · an1 a12 a22 · · · an2 AT = . .. .. ∈ Mm×n . .. .. . . . a1m a2m · · · anm 2. The algebra of matrices The sum of two n × m matrices is the matrix whose row vectors are the sums of the corresponding i=1,...,n i=1,...,n row vectors of the two original matrices. Thus, if A = (aij )j=1,...,m and B = (bij )j=1,...,m A + B = (aij 2 1 Example 2.1. Find A + B, where A = 9 6 2+1 1+4 A+B = 9 + 5 6 + (−2)
i=1,...,n
+ bij )j=1,...,m . 3 and B = 5 3+0 = 5 + (−3)
1 5 3 14
0 . −3 5 3 4 2
4 −2
The product of a matrix by a scalar is defined to be the matrix in which each element is multiplied i=1,...,n by that scalar. Thus, if A = (aij )j=1,...,m and λ ∈ R, then i=1,...,n
λA = (λaij )j=1,...,m . 1
2
TOPIC 1: MATRICES AND DETERMINANTS
Example 2.2. Let λ = 3 and A =
2 9
1 6
3 5
. Then 3A =
6 27
3 18
9 15
.
The product of a n × m matrix by a m × p matrix is a n × p matrix whose element in the ith row and jth column is the scalar product of the ith row vector of the first matrix and the jth j=1,...,m i=1,...,n column vector of the second matrix. Thus, if A = (aij )j=1,...,m and B = (bij )k=1,...,p , the matrix C = AB ∈ Mn×p has elements cij = ai1 b1j + ai2 b2j + · · · + aim bmj .
1 and B = 7 8
6 −4 . 0
2 1 5 −3 0 2 49 8= 2 · 6 + 1 · (−4) + 5 · 0 Answer: AB = . However, BA cannot be computed, as the 13 −18 dimensions do not agree.
Example 2.3. Compute AB and BA, where A =
2.1. Properties. It is assumed that the matrices in each of the following laws are such that the indicated operation can be performed and that α, β ∈ R. (1) (AT )T = A. (2) (A + B)T = AT + B T . (3) A + B = B + A (commutative law). (4) A + (B + C) = (A + B) + C (associative law). (5) α(A + B) = αA + αB. (6) (α + β)A = αA + βA. (7) Matrix multiplication is not always commutative, i.e., AB 6= BA. (8) A(BC) = (AB)C (associative law). (9) A(B + C) = AC + AB and A(B + C) = AB + AC (distributive with respect to addition). (10) In A = AIn = A and 0n A = A0n = 0n . Definition 2.4. A square matrix A is called regular or invertible if there exists a matrix B such that AB = BA = In . The matrix B is called the inverse of A and it is denoted A−1 . Theorem 2.5. The inverse matrix is unique. Uniqueness of A−1 can be easily proved. For, suppose that B is another inverse of matrix A. Then BA = In and B = BIn = B(AA−1 ) = (BA)A−1 = In A−1 = A−1 , showing that B = A−1 . 2.2. Properties. It is assumed that the matrices in each of the following laws are regular. (1) (A−1 )−1 = A. (2) (AT )−1 = (A−1 )T . (3) (AB)−1 = B −1 A−1 . 3. Determinants To a square matrix A we associate a real number called the determinant, |A| or det (A), in the following way. For a matrix of order 1, A = (a), det (A) = a. a b For a matrix of order 2, A = , det (A) = ad − bc. c d For a matrix of order 3 a11 a12 a13 a a12 a13 a12 a13 a23 . det (A) = a21 a22 a23 = a11 22 − a + a 21 31 a32 a33 a32 a33 a22 a23 a31 a32 a33
TOPIC 1: MATRICES AND DETERMINANTS
3
This is known as the expansion of the determinant by the first column, but it can be done for any other row or column, giving the same result. Notice the sign (−1)i+j in front of the element aij . Before continuing with the inductive definition, let us see an example. Example 3.1. Compute the following determinant expanding by the second column. 1 2 1 4 3 5 = (−1)1+2 2 4 5 + (−1)2+2 3 1 1 + (−1)2+3 1 1 1 4 5 3 3 3 3 3 1 3 = −2 · (−3) + 3 · (0) − (1) · 1 = 5 For general n the method is the same that for matrices of order 3, expanding the determinant by a row or a column and blackucing in this way the order of the determinants that must be computed. For a determinant of order 4 one has to compute 4 determinants of order 3. Definition 3.2. Given a matrix A of order n, the complementary minor of element aij is the determinant of order n − 1 which results from the deletion of the row i and the column j containing that element. The adjoint of aij is the minor multiplied by (−1)i+j . According to this definition, the determinant of matrix A can be defined as |A| = ai1 Ai1 + ai2 Ai2 + · · · + ain Ain
(by row i)
or, equivalently |A| = a1j A1j + a2j A2j + · · · + anj Anj Example 3.3. Find the value of the determinant 1 2 0 4 7 2 1 3 3 0 2 0 Answer: Expanding 1 2 4 7 1 3 0 2
the determinant by the 0 3 1 2 1 3+2 = (−1) 2 1 3 1 0 0 7
3 1 1 7
(by column j).
.
third column, one gets 1 2 3 3 1 + (−1)3+3 3 4 0 2 7
2 7 2
3 1 7
.
3.1. Properties of the determinants. It is assumed that the matrices A and B in each of the following laws are square of order n and λ ∈ R. (1) |A| = |AT |. (2) |λA| = λn |A|. (3) |AB| = |A||B|. 1 . (4) A matrix A is regular if and only if |A| = 6 0; in this case |A−1 | = |A| (5) If in a determinant two rows (or columns) are interchanged, the value of the determinant is changed in sign. (6) If two rows (columns) in a determinant are identical, the value of the determinant is zero. (7) If all the entries in a row (column) of a determinant are multiplied by a constant λ, then the value of the determinant is also multiplied by this constant. (8) In a given determinant, a constant multiple of the elements in one row (column) may be added to the elements of another row (column) without changing the value of the determinant. The next result is very useful to check if a given matrix is regular or not. Theorem 3.4. A square matrix A has an inverse if and only |A| = 6 0.
4
TOPIC 1: MATRICES AND DETERMINANTS
4. Elementary operations with matrices. Inverse matrix The following operations with rows and columns of a matrix A ∈ Mn×m are called elementary operations. • Interchange of parallel lines of A (rows or columns). • Multiplication of a line of A (row or column) by a constant different from zero. • Addition to a line of A (row or column) a constant multiple of another parallel line. All these operations can be given in terms of matrices. An operation on the rows of A is equivalent to multiplication by the left by an elementary matrix E ∈ Mn . In the same way, an operation on the columns of A is equivalent to multiplication by the right by an elementary matrix E ∈ Mm . 2 4 By way of example, to interchange rows 1 and 3 in the matrix A = 3 6 , we multiply at 7 9 0 0 1 the left by matrix E = 0 1 0 to get 1 0 0 2 4 7 9 0 0 1 EA = 0 1 0 3 6 = 3 6 . 7 9 2 4 1 0 0 0 1 0 To exchange rows 1 and 2, the elementary matrix is E = 1 0 0 (please check). To add to 0 0 1 1 0 0 the row 2 of A row 3 multiplied by 7, we can multiply at the left by the matrix E = 0 1 7 0 0 1 to obtain 2 4 2 4 1 0 0 EA = 0 1 7 3 6 = 52 69 7 9 7 9 0 0 1 1 0 0 To multiply row 2 of A by 5, we can multiply at the left by the matrix E = 0 5 0 to get 0 0 1 2 4 2 4 1 0 0 EA = 0 5 0 3 6 = 15 30 . 0 0 1 7 9 7 9 Definition 4.1. Two matrices A and B of the same size are called equivalent if one of them can be obtained from the other by means of finitely many elementary operations. We are interested in computing the inverse of a regular matrix by means of elementary operations. Theorem 4.2. If A ∈ Mn is regular, then A is equivalent to the identity matrix In , that is, there exists elementary matrices E1 , . . . , Er and E10 , . . . , Er0 such that Er · · · E1 A = In and AE10 · · · Er0 = In . Hence the inverse matrix of A is A−1 = Er · · · E1 = E10 · · · Er0 . inverse of a regular matrix by means of elementary operations on practical point of view, the Gauss method considers the matrix a11 a12 . . . a1n | 1 0 a21 a22 . . . a2n | 0 1 (A|In ) = . .. .. . . .. .. . . . | .. .. an1
an2
...
ann
| 0
0
This says that one can find the the identity matrix In . From a ... ... .. .
0 0 .. .
...
1
TOPIC 1: MATRICES AND DETERMINANTS
5
and performs elementary operations on rows until A is transformed into the identity matrix In , so that In becomes A−1 . 1 1 0 Example 4.3. Find the inverse of the matrix A = 0 1 1 . 1 0 1 1 1 0 | 1 0 0 Answer: Consider the matrix (A|I3 ) = 0 1 1 | 0 1 0 . In the following operations, 1 0 1 | 0 0 1 ri denotes the ith row vector, and ri − λrj means that we subtracts λ times the row rj to the row ri . 1 1 0 | 1 0 0 1 1 0 | 1 0 0 1 1 | 0 1 0 ; (r3 + r2 ) ∼ 0 1 1 | 0 1 0 (r3 − r1 ) ∼ 0 0 −1 1 | −1 0 1 0 0 2 | −1 1 1 1 1 0 | 1 0 0 2 0 0 | 1 −1 1 1 1 −1 ; (2r1 − r2 ) ∼ 0 2 0 | 1 1 −1 (2r2 − r3 ) ∼ 0 2 0 | 0 0 2 | −1 1 1 0 0 2 | −1 1 1 1 0 0 | 1/2 −1/2 1/2 1 1/2 1/2 −1/2 ∼ 0 1 0 | 2 0 0 1 | −1/2 1/2 1/2 Hence, the inverse matrix is 1/2 −1/2 1/2 1/2 −1/2 . A−1 = 1/2 −1/2 1/2 1/2 5. Rank of a matrix The concept of rank of a matrix is fundamental in the study of linear systems of equations. Definition 5.1. The echelon form of a matrix A ∈ Mn×m is the equivalent matrix B ∈ Mn×m with zeros below (above) the main diagonal. Definition 5.2. The rank of a matrix A ∈ Mn×m is the number of non–null rows (columns) in the echelon form of the matrix. 5.1. Properties. Let A, B ∈ Mn×m . (1) Matrices A and B are equivalent if and only if rank (A) = rank (B). (2) rank (AT ) = rank (A). (3) rank (A) ≤ min{n, m}. (4) If A is square, then rank (A) = n if and only if |A| = 6 0. −2 −1 1 2 2 2 −3 . Example 5.3. Find the rank of the matrix A = 0 4 1 −1 0 Answer: The rank is at most 3. Let us find the echelon form of A. −2 −1 1 2 −2 −1 1 2 −2 (1/2)r2 +r3 2r +r 0 2 2 −3 1∼ 3 0 2 2 −3 0 ∼ 4 1 −1 0 0 −1 1 4 0
−1 1 2 2 0 2
2 −3 . 5/2
Hence, the rank of A is 3 (three non–null row vectors in the echelon form of A). There exists an alternative definition of rank, equivalent to the one given above. Definition 5.4. Given a matrix A ∈ Mn×m , a minor of order r of A is any determinant of order r that can be formed with r rows and r columns of A.
6
TOPIC 1: MATRICES AND DETERMINANTS
Theorem 5.5. The rank of the matrix A coincides with the order of the largest non–null minor of A. Observe that to determine the rank of a matrix A with this method, one can use any of its equivalent matrices, in particular, the echelon form of the matrix A. −1 2 1 0 3 1 1 . Example 5.6. Find the rank of A = 0 2 −1 −1 1 Answer: The rank is at most 3. Instead of finding the echelon form of A let us use minors. −1 2 6= 0 hence, the rank of A is 2 at least. If we find one non–null minor of order Notice that 0 3 3, then the rank is 3. We need to check 4 minors of order 3 2 −1 −1 −1 1 0 1 0 2 0 2 1 0 1 1 = 0. 1 1 = 0, 3 3 1 = 0, 0 3 1 = 0, 0 −1 −1 1 2 −1 1 2 −1 1 2 −1 −1 Hence, the rank is 2. Of course, the same result is obtained by elementary transformations −1 2 1 0 1 −2 −1 0 1 −2 −1 0 r2 −2r1 0 3 1 1 ∼ 2 −1 −1 1 ∼ 0 3 1 1 2 −1 −1 1 0 3 1 1 0 3 1 1 1 −2 −1 0 r3 −r2 3 1 1 . ∼ 0 0 0 0 0