7 Matrices
7.1 Basic Arithmetic of Matrices
Definition 7.1. A matrix (plural: matrices) is a rectangular array of numbers. A
horizontal unit is called a row, while a vertical unit is called a column. The element
in the ith row and the jth column is called the (i, j)th entry of the matrix.
An m × n matrix is a matrix with m rows and n columns. The rows are counted from
the top, while the columns are counted from the left. The collection of all m × n
matrices with real entries is denoted by Mm×n (R). We usually use a capital letter to
denote a matrix, and use small letters to denote its entries. For example, A = (aij )m×n
denotes an m × n matrix A with entries aij , where 1 ⩽ i ⩽ m and 1 ⩽ j ⩽ n.
1 2 3
Example 7.1. The matrix A = ( ) is a 2 × 3 matrix. Its first row is (1 2 3),
4 5 6
3
and its third column is ( ). The (2, 1)th entry of A is 4.
6
Definition 7.2. A square matrix is a matrix with the same number of rows and
columns.
Definition 7.3. The main diagonal of a matrix is the collection of the (1, 1)th,
(2, 2)th, . . ., (n, n)th entries.
Definition 7.4. A diagonal matrix is a square matrix whose entries not lying on the
main diagonal are all 0.
⎛4 0 0⎞
Example 7.2. The matrix A = ⎜0 5 0⎟ is a diagonal matrix (thus also a square
⎝0 0 0⎠
⎛0 0 1⎞
matrix). The matrix B = ⎜0 2 0⎟ is a square matrix but is not a diagonal matrix.
⎝3 0 0⎠
Definition 7.5. Two matrices A = (aij )m×n and B = (bij )k×ℓ are said to be equal if
m = k, n = ℓ, and aij = bij for all i and j.
1
As usual, we write A = B if A and B are equal matrices.
Definition 7.6. Let A = (aij )m×n and B = (bij )m×n be two matrices of the same size.
The matrix addition is defined by
A + B = (aij + bij ).
Example 7.3. We have
1 2 5 7 1+5 2+7 6 9
( )+( )=( )=( ).
3 4 8 6 3+8 4+6 11 10
Definition 7.7. The m × n zero matrix, denoted by Om×n or simply O, is the m × n
matrix whose every entry is 0.
Definition 7.8. Let A = (aij )m×n be a matrix. The additive inverse of A, denoted
by −A, is the matrix (−aij )m×n .
Proposition 7.1. Let A, B and C be matrices of the same size, and let O be the
zero matrix of the same size. Then the following hold.
(a) (commutativity) A + B = B + A
(b) (associativity) (A + B) + C = A + (B + C)
(c) O + A = A
(d) A + (−A) = O
Definition 7.9. Let A = (aij )m×n and B = (bij )m×n be two matrices of the same size.
The matrix subtraction is defined by
A − B = (aij − bij ).
Example 7.4. We have
5 7 1 2 5−1 7−2 4 5
( )−( )=( )=( ).
8 6 3 4 8−3 6−4 5 2
2
Definition 7.10. Let A = (aij )m×n be a matrix and let c be a scalar. The scalar
multiplication is defined by
cA = (caij ).
Example 7.5. We have
1 2 5(1) 5(2) 5 10
5( )=( )=( ).
3 4 5(3) 5(4) 15 20
Proposition 7.2. Let A and B be matrices of the same size, and let c and d be two
scalars. Then the following hold.
(a) 1(A) = A, 0(A) = O, (−1)(A) = −A
(b) (cd)A = c(dA)
(c) (distributivity) c(A + B) = cA + cB, (c + d)A = cA + dA
Definition 7.11. Let A = (aij )m×n be a matrix. The transpose of A, denoted by AT ,
is the matrix (aji )n×m .
Example 7.6. We have
1 2 3
T ⎛1 4⎞
( ) = ⎜2 5⎟ .
4 5 6 ⎝3 6⎠
Proposition 7.3. Let A and B be matrices of the same size, and let c be a scalar.
Then the following hold.
(a) (AT )T = A
(b) (A + B)T = AT + B T
(c) (cA)T = cAT
Definition 7.12. Let A = (aij )m×n and B = (bij )n×ℓ be matrices. The matrix product
AB of A and B is defined to be the matrix (cij )m×ℓ where
cij = ai1 b1j + ai2 b2j + ⋯ + ain bnj .
3
The product AB is only defined when the number of columns of A is the same as
the number of rows of B. We can define the positive power of a square matrix in the
natural way. For example, A2 = AA and A3 = (A2 )A, etc.
Example 7.7. We have
1 2 5 6 (1)(5) + (2)(7) (1)(6) + (2)(8) 19 22
( )( )=( )=( ).
3 4 7 8 (3)(5) + (4)(7) (3)(6) + (4)(8) 43 50
Definition 7.13. The n × n identity matrix, denoted by In or simply I, is the n × n
diagonal matrix whose every diagonal entry is 1.
Proposition 7.4. Let A, B and C be matrices such that the following operations
are well-defined, and let c be a scalar. Then the following hold.
(a) (associativity) (AB)C = A(BC)
(b) AO = O, OB = O, AI = A, IB = B
(c) (distributivity) A(B + C) = AB + AC, (A + B)C = AC + BC
(d) c(AB) = (cA)B = A(cB)
(e) (AB)T = B T AT
Matrix multiplication is not commutative in general. This means AB and BA are
not necessarily the same even if both are well-defined.
Definition 7.14. An n × n matrix A is said to be invertible or non-singular if there
exists an n × n matrix B such that
AB = In = BA.
Such a matrix B is called the inverse of A, and is usually denoted by A−1 . A square
matrix which has no inverse is said to be non-invertible or singular.
Proposition 7.5. The inverse of a matrix, if exists, is unique.
1 2 −5 2
Example 7.8. The matrix A = ( ) is invertible, and A−1 = ( ).
3 5 3 −1
4
1 2
Example 7.9. The matrix B = ( ) is non-invertible.
3 6
Proposition 7.6. Let A and B be invertible matrices of the same size, and let c be
a nonzero scalar. Then the following hold.
(a) A−1 is invertible and (A−1 )−1 = A
(b) cA is invertible and (cA)−1 = c−1 A−1
(c) AB is invertible and (AB)−1 = B −1 A−1
(d) AT is invertible and (AT )−1 = (A−1 )T
7.2 Determinants
Definition 7.15. The determinants of a 1 × 1 matrix A = (a), a 2 × 2 matrix
a b ⎛a b c⎞
B=( ), and a 3 × 3 matrix C = ⎜d e f ⎟ are defined to be
c d ⎝g h i⎠
det A = a,
det B = ad − bc,
det C = aei + bf g + cdh − gec − dbi − ahf
respectively.
The determinant of A can also be represented as ∣A∣. Another common notation for
a b a b
the determinant of a matrix ( ) is ∣ ∣.
c d c d
Example 7.10. We have
RRR1 2 0RRR
RRR RR
RRRR3 4 5RRRRR = (1)(4)(7)+(2)(5)(0)+(0)(3)(6)−(0)(4)(0)−(3)(2)(7)−(1)(6)(5) = −44.
RRR0 6 7RRR
Also, we have det O = 0 and det I = 1.
Theorem 7.1. A square matrix A is invertible if and only if det A ≠ 0.
5
3 2 3 2
Example 7.11. Since ∣ ∣ = 0, the matrix ( ) is non-invertible.
6 4 6 4
Proposition 7.7. Let A and B be square matrices of size n × n. Then the following
hold.
(a) det (AB) = (det A)(det B)
(b) det (kA) = k n det A for any k ∈ R
(c) det (AT ) = det A
1
(d) if A is invertible, then det (A−1 ) =
det A
(e) if A has a zero row or a zero column, then det A = 0
(f) if A has two identical rows or two identical columns, then det A = 0
Example 7.12. Let both A and B be 3 × 3 matrices such that det A = 2 and B is
invertible. Then det (−B T A2 B −1 ) = −4.
Definition 7.16. Let A = (aij ) be an n × n matrix where n ⩾ 2. Let Aij be the
(n − 1) × (n − 1) matrix obtained by deleting the ith row and the jth column of A.
The (i, j)-cofactor of A is defined by
cij = (−1)i+j det (Aij ).
⎛1 2 3⎞ 1 2
Example 7.13. The (2, 3)-cofactor of ⎜4 5 6⎟ is − ∣ ∣ = 6.
⎝7 8 9⎠ 7 8
Theorem 7.2. Let A be an invertible matrix. Let B be the matrix whose (i, j)th
entry is the (j, i)-cofactor cji of A. Then
1
A−1 = B.
det A
a b
Example 7.14. Let A = ( ) where det A = ad − bc ≠ 0. Then
c d
1 d −b
A−1 = ( ).
ad − bc −c a
6
⎛1 1 2⎞ ⎛−3 1 2 ⎞
Example 7.15. The inverse of B = ⎜2 3 4⎟ is ⎜−2 1 0 ⎟.
⎝1 0 1⎠ ⎝ 3 −1 −1⎠
7
Links
Theorems
7.1: Criterion for a matrix to be invertible
7.2: Inverse of a matrix
Propositions
7.1: Properties of matrix addition
7.2: Properties of scalar multiplication
7.3: Properties of transposes
7.4: Properties of matrix multiplication
7.5: Uniqueness of the matrix inverse
7.6: Properties of matrix inverses
7.7: Properties of determinants
Terminologies and Notations
Mm×n (R)
additive inverse −A
cofactor cij
column
determinant det A, ∣A∣
diagonal matrix
entry
equal (matrix)
identity matrix I
inverse (matrix) A−1
invertible matrix
main diagonal
matrices
matrix
matrix addition A + B
matrix power Ak
matrix product AB
8
matrix subtraction A − B
non-invertible matrix
non-singular
row
scalar multiplication cA
singular
square matrix
transpose AT
zero matrix O