Professional Documents
Culture Documents
Chapter 1 - Matrices
Chapter 1 - Matrices
1 / 61
References and course policies
Textbooks and References
(1) Serge Lang, Introduction to Linear Algebra, 2nd Ed. Springer, India.
(2) Gilbert Strang, Linear Algebra and its applications, 4th Ed. Cengage.
(3) M.K. Srinivasan and J.K. Verma, Notes on Linear Algebra, 2014.
(4) B.V. Limaye, Linear Algebra, Slides for a course at IIT Dharwad, 2019.
Attendance Policy: If attendance is less than 80 % , a DX grade will be awarded.
Evaluation scheme
Mode Time Marks
5 quizzes tutorial hours 9 marks, 3 best scores
Test 5 Feb, 8.30-9.25 11
Final exam TBA 30
Total 50
2 / 61
Notation
Notation:
1 N := {1, 2, 3, . . .}
2 Z := {. . . , −3, −2, −1, 0, 1, 2, 3, . . .}
3 R := the set of all real numbers
4 C := the set of all complex numbers
5 For n ∈ N, let us consider the Euclidean space
Rn := {(x1 , . . . , xn ) : xj ∈ R for j = 1, . . . , n}.
6 We let 0 := (0, . . . , 0). Also, for x := (x1 , . . . , xn ) and y := (y1 , . . . , yn ) in
Rn , and for α ∈ R, we define
(sum) x + y := (x1 + y1 , . . . , xn + yn ) ∈ Rn ,
(scalar multiple) α x := (α x1 , . . . , α xn ) ∈ Rn ,
(scalar product) x · y := x1 y1 + · · · + xn yn ∈ R.
3 / 61
Matrices
1 Let m, n ∈ N. An m × n matrix A with real entries is a rectangular array of
real numbers arranged in m rows and n columns, written as follows:
2 Let Rm×n denote the set of all m × n matrices with real entries.
3 If A := [ajk ] and B := [bjk ] are in Rm×n , then we say A = B ⇐⇒ ajk = bjk
for all j = 1, . . . , m and k = 1, . . . , n.
4 Let 0 ≤ r < m, 0 ≤ s < n. By deleting r rows and s columns from A, we
obtain an (m − r )×(n − s) submatrix of A.
4 / 61
Matrices
1 An n × n matrix, that is, an element of Rn×n , is called a square matrix of
size n.
2 A square matrix A = [ajk ] is called symmetric if ajk = akj for all j, k.
3 A square matrix A = [ajk ] is called skew-symmetric if ajk = −akj for all j, k.
4 A square matrix A = [ajk ] is called a diagonal matrix if ajk = 0 for all j 6= k.
5 A diagonal matrix A = [ajk ] is called a scalar matrix if all diagonal entries of
A are equal.
6 Two important scalar matrices are the identity matrix I in which all diagonal
elements are equal to 1, and the zero matrix O in which all diagonal
elements are equal to 0.
7 A square matrix A = [ajk ] is called upper triangular if ajk = 0 for all j > k,
and lower triangular if ajk = 0 for all j < k.
8 Note: A matrix A is upper triangular as well as lower triangular if and only if
A is a diagonal matrix.
5 / 61
Matrices: Examples
1 2 3 0 2 3
1 The matrix 2 4 5 is symmetric, while the matrix −2 0 5 is
3 5 6 −3 −5 0
skew-symmetric.
2 Note: Every diagonal entry of a skew-symmetric matrix is 0 since
ajj = −ajj =⇒ ajj = 0 for j = 1, . . . , n.
2 0 0 2 0 0
3 The matrix 0 3 0 is diagonal, while 0 2 0 is a scalar matrix.
0 0 4 0 0 2
2 1 −1 2 0 0
4 The matrix 0 3 1 is upper triangular, while the matrix 1 3 0
0 0 4 −1 1 4
is lower triangular.
6 / 61
Matrices: Row and Column vectors
1 A row vector a of length n is a matrix with only one row consisting of n real
numbers; it is written as
a = a1 · · · ak · · · an ,
7 / 61
Operations on Matrices
8 / 61
Operations on Matrices
9 / 61
Operations on Matrices
b1
..
.
n×1
bk ∈ R
We shall often write a column vector b := as
1
..
.
bn
T
b1 · · · bk · · · bn in order to save space.
2 Let m, n ∈ N. Let α1 , . . . , αm ∈ R.
3 If a1 , . . . , am ∈ R1×n , then
α1 a1 + · · · + αm am ∈ R1×n
is called a (finite) linear combination of a1 , . . . , am .
4 Similarly, if b1 , . . . , bm ∈ Rn×1 , then
α1 b1 + · · · + αm bm ∈ Rn×1
is a (finite) linear combination of b1 , . . . , bm .
10 / 61
Operations on Matrices
1 Now, for k = 1, . . . , n, consider the column vector
T
ek := 0 · · · 1 · · · 0 ∈ Rn×1 , where the kth entry is 1 and all other
entries are 0.
T
2 If b = b1 · · · bk · · · bn is any column vector of length n, then it
follows that b = b1 e1 + · · · + bk ek + · · · + bn en , which is a linear
combination of e1 , . . . , en .
3 The vectors e1 , . . . , en are known as the basic column vectors in Rn×1 .
4 Let A := [ajk ] ∈ Rm×n . Then
ajn ∈ R1×n is called the jth row vector of A for
i. aj := aj1 ···
a1
..
j = 1, . . . , m, and we write A = . and
am
T
ii. ck := a1k · · · a mk is called the kth column vector of A for k = 1, . . . , n,
and we write A = c1 · · · cn .
11 / 61
Operations on Matrices: Examples
2 1 −1 1 0 2
Let A := and B := .
0 3 1 −1 4 1
3 1 1 10 5 −5
1 Then A + B := and 5A = .
−1 7 2 0 15 5
2 The row vectors of A are 2 1 −1 and 0 3 1 .
2 1 −1
3 The column vectors of A are and and .
0 3 1
2 0
4 Also, AT = 1 3.
−1 1
12 / 61
Matrix Multiplication
1 Before we discuss when and how a product AB of A and B may be defined,
we define the product of a row vector a and a column vector b of the same
length.
2 Since every matrix can be written in terms of row vectors as well as in terms
of column vectors, we shall then consider the product AB.
T
3 Let n ∈ N, a := a1 · · · an ∈ R1×n and b := b1 · · · bn ∈ Rn×1 .
4 Define the product of a row vector a and a column vector b as follows:
b1
.
ab = a1 · · · an .. := a1 b1 + · · · + an bn ∈ R.
bn
a1
Let m ∈ N and A ∈ Rm×n . Then A = ... , where a1 , . . . , am ∈ R1×n .
5
am
13 / 61
Matrix Multiplication
1 Recalling that b ∈ Rn×1 , we define
a1 a1 b
Ab = ... b := ... ∈ Rm×1 .
am am b
4 Thus
a1 a1 b1 ··· a1 bp
.. .. .. ∈ Rm×p .
AB = . [b1 · · · bp ] = . .
am am b1 ··· am bp
14 / 61
Matrix Multiplication
1 So if m, n, p ∈ N, A := [ajk ] ∈ Rm×n and B := [bjk ] ∈ Rn×p , then
AB ∈ Rm×p , and for j = 1, . . . , m; k = 1 . . . , p,
n
X
AB = [cjk ], where cjk := aj bk = aj` b`k .
`=1
2 Note that the (j, k)th entry of AB is a product of the jth row vector of A
with the kth column vector of B as shown below:
b1k
..
.
aj1 · · · aj` · · · ajn
b`k .
..
.
bnk
3 Clearly, the product AB is defined only when the number of columns of A is
equal to the number of rows of B.
4 Note: AI = A, IA = A, AO = O and OA = O whenever these products are
defined.
15 / 61
Matrix Multiplication: Examples
1 6 0 2
2 1 −1
1 Let A := , B := 2 −1 1 −2 .
0 3 1 2×3 2 0 −1 1 3×4
2 11 2 1
Then AB = .
8 −3 2 −5 2×4
16 / 61
Matrix Multiplication: Important Remark
17 / 61
Properties of Matrix Multiplication
Proposition
Let m, n, p, q ∈ N. If A ∈ Rm×n , B ∈ Rn×p and C ∈ Rp×q , then A(BC) = (AB)C
(which we shall write as ABC).
Proof. Let A := [ajk ], B := [bjk ] and C := [cjk ]. Also, let (AB)C := [αjk ] and
A(BC) := [βjk ].
Pp Pn Pn Pp
Then αjk = i=1 `=1 aj` b`i cik = `=1 aj` i=1 b`i cik = βjk .
18 / 61
Properties of Matrix Multiplication continues...
Proposition
Let m, n, p ∈ N. If A ∈ Rm×n and B ∈ Rn×p , then (AB)T = BT AT .
19 / 61
Linear System
1 Let m, n ∈ N. A linear system of m equations in n unknowns x1 , ..., xn is
given by
a11 x1 + a12 x2 + · · · + a1n xn = b1 (1)
a21 x1 + a22 x2 + · · · + a2n xn = b2 (2)
.. .. .. .. ..
. . . . .
am1 x1 + am2 x2 + · · · + amn xn = bm (m)
where ajk ∈ R for j = 1, . . . , m; k = 1, . . . , n and also bj ∈ R for j = 1, . . . , m
are given.
T
2 Let A := [ajk ] ∈ Rm×n , x := x1 · · · xn ∈ Rn×1 and
T
b := b1 · · · bm ∈ Rm×1 .
3 Using matrix multiplication, we write the linear system as
Ax = b.
s ∈ S =⇒ A(x0 + s) = Ax0 + As = b + 0 = b.
22 / 61
Linear System: A Special Case
23 / 61
Linear System: A Special Case
xn = bn /ann
xn−1 = (bn−1 − a(n−1)n xn )/a(n−1)(n−1), where xn = bn /ann
.. .. ..
. . .
x2 = (b2 − a2n xn − · · · − a23 x3 )/a22 , where xn = · · ·, x3 = · · ·
x1 = (b1 − a1n xn − · · · − · · · − a12 x2 )/a11 , where xn = · · ·, x2 = · · ·
1 Here the homogeneous system Ax = 0 has only the zero solution and the
general system Ax = b has a unique solution.
2 Taking a cue from this special case of an upper triangular matrix, we shall
attempt to transform any m × n matrix to an upper triangular form.
24 / 61
Linear System continues...
1 In this process, we successively attempt to eliminate the unknown x1 from
the equations (m), . . . , (2), the unknown x2 from the equations (m), . . . , (3),
and so on.
2 Example: Consider the linear system
x1 − x2 + x3 = 0
−x1 + x2 − x3 = 0
10x2 + 25x3 = 90
20x1 + 10x2 = 80.
25 / 61
Linear System: Example continues...
1 Interchanging the 2nd and the 3rd equations,
x1 − x2 + x3 = 0
10x2 + 25x3 = 90
0 = 0
30x2 − 20x3 = 80.
2 Eliminating x2 from the 4th equation, and then interchanging the 3rd and the
4th equations,
x1 − x2 + x3 = 0
10x2 + 25x3 = 90
−95x3 = −190
0 = 0.
1 The above process can be carried out without writing down the entire linear
system by considering the augmented matrix
a11 a12 · · · a1n b1
a12 a22 · · · a2n b2
[A|b] := .. .. .. .. .. .
. . . .
.
am1 am2 · · · amn bm
27 / 61
Linear System: Example continues...
1 Subtracting 20 times the
first row from the 4th row, and addingthe first row to the
second
row, we obtain
1 −1 1 0
R4 −20R1 , R2 +R1 , 0 0 0 0
−−−−−−−−−−→ 0 10
.
25 90
0 30 −20 80
1 The upper triangular nature of the 3 × 3 matrix on the top left enables back
substitution.
2 We shall now consider a general form of a matrix for which the method of
back substitution works.
3 Let A ∈ Rm×n , that is, A is an m × n matrix with real entries.
4 A row of A is said to be zero if all its entries are zero.
5 If a row is not zero, then its first nonzero entry (from the left) is called the
pivot.
6 Thus all entries to the left of a pivot equal 0.
7 Suppose A has r nonzero rows and m − r zero rows.
8 Then 0 ≤ r ≤ m. Clearly, r = 0 ⇐⇒ A = O.
29 / 61
Row Echelon Form
0 1 4
1 If A = 0 0 0, then m = n = 3 and r = 2.
5 6 7
2 The pivot in the 1st row is 1 and the pivot in the 3rd row is 5.
3 A matrix A is said to be in a row echelon form (REF) if the following
conditions are satisfied.
i. The nonzero rows of A precede the zero rows of A.
ii. If A has r nonzero rows, where r ∈ N, and the pivot in row 1 appears in the
column k1 , the pivot in row 2 appears in the column k2 , and so on the pivot in
row r appears in the column kr , then k1 < k2 < · · · < kr .
0 1 4 0 1 4 0 1 4
4 The matrices 0 0 0, 5 6 7, 0 5 7 are not in REF.
5 6 7 0 0 0 0 0 0
30 / 61
Row Echelon Form: Examples and Pivotal Columns
5 6 7
1 The matrix 0 1 4 is in a REF.
0 0 0
2 Pivotal Columns:
i. Suppose a matrix A ∈ Rm×n is in a REF. If A has exactly r nonzero rows, then
there are exactly r pivots. A column of A containing a pivot, is called a pivotal
column. Thus there are exactly r pivotal columns, and so 0 ≤ r ≤ n. (We
have already noted that 0 ≤ r ≤ m.)
ii. In a pivotal column, all entries below the pivot equal 0.
3 Here is a typical example of how back substitution works when a matrix A is
in a REF.
4 Let
0 a12 a13 a14 a15 a16
b1
0 0 0 a24 a25 a26 b2
A :=
0
and b := .
b3
0 0 0 a35 a36
0 0 0 0 0 0 b4
where a12 , a24 , a35 are nonzero. They are the pivots.
31 / 61
Row Echelon Form: Example continues...
1 Here m = 4, n = 6, r = 3, pivotal columns: 2 , 4 and 5 .
T
2 Suppose there is c := c1 · · · c6 ∈ R6×1 such that Ac = b. Then
0c1 + · · · + 0c6 = b4 , that is, b4 must be equal to 0.
3 Next, the linear system Ax = b =⇒ a35 x5 + a36 x6 = b3 , that is,
x5 = (b3 − a36 x6 )/a35 , where we can assign an arbitrary value to the
unknown x6 .
4 Next, Ax = b =⇒ a24 x4 + a25 x5 + a26 x6 = b2 , that is,
x4 = (b2 − a25 x5 − a26 x6 )/a24 , where we back substitute the values of x5 and
x6 .
5 Finally, Ax = b =⇒ a12 x2 + a13 x3 + a14 x4 + a15 x5 + a16 x6 = b1 , that is,
x2 = (b1 − a13 x3 − a14 x4 − a15 x5 − a16 x6 )/a12 , where we can assign an
arbitrary value to the variable x3 , and back substitute the values of x4 , x5
and x6 .
6 Also, we can assign an arbitrary value to the variable x1 .
7 The variables x1 , x3 and x6 to which we can assign arbitrary values
correspond to the nonpivotal columns 1 , 3 and 6 .
32 / 61
Linear System: Important observations
1 Suppose an m×n matrix A is in a REF, and there are r nonzero rows.
Let the r pivots be in the columns k1 , . . . , kr with k1 < · · · < kr , and let the
columns `1 , . . . , `n−r be nonpivotal.
Then xk1 , . . . , xkr are called the pivotal variables and x`1 , . . . , x`n−r are
called the free variables.
2 Let b := [b1 · · · br br +1 · · · bm ]T , and consider the linear system Ax = b.
3 Important Observations
i. The linear system has a solution ⇐⇒ br +1 = · · · = bm = 0. This is known as the
consistency condition.
ii. Let the consistency condition br +1 = · · · = bm = 0 be satisfied. Then we obtain
T
a particular solution x0 := x1 · · · xn of the linear system by letting
xk := 0 if k ∈ {`1 , . . . , `n−r }, and then by determining the pivotal
variables/coordinates xk1 , . . . , xkr of x by back substitution.
iii. We obtain n − r basic solutions of the homogeneous linear system Ax = 0 as
follows.
33 / 61
Linear System: Important observations
Fix ` ∈ {`1 , . . . , `n−r }.
T
Define s` := x1 · · · xn by xk := 1 if k = `, while xk := 0 if
k ∈ {`1 , . . . , `n−r } but k 6= `. Then determine the pivotal
variables/coordinates xk1 , . . . , xkr of s` by back substitution in Ax = 0.
T
iv. Let s := r1 · · · rn ∈ Rn×1 be any solution of the homogeneous system,
that is, As = 0.
Then s is a linear combination of the n − r basic solutions s`1 , . . . , s`n−r .
To see this, let y := s − r`1 s`1 − · · · − r`n−r s`n−r .
Then Ay = As − r`1 As`1 − · · · − r`n−r As`n−r = 0, and moreover, the kth
entry of y is 0 for each k ∈ {`1 , . . . , `n−r } (why?).
It then follows that y = 0 (why?), that is, s = r`1 s`1 + · · · + r`n−r s`n−r .
Thus we find that the general solution of the homogeneous system Ax = 0 is
given by s = α1 s`1 + · · · + αn−r s`n−r , where α1 , . . . , αn−r ∈ R .
34 / 61
Linear System: Important observations
v. The general solution of Ax = b is given by
1 Example:
0 2 1 0 2 5 0
0 0 0 3 5 0 1
Let A := and b := .
0 0 0 0 1 2 2
0 0 0 0 0 0 0
Then x5 + 2x6 = 2 =⇒ x5 = 2,
3x4 + 5x5 + 0x6 = 1 =⇒ x4 = −3,
2x2 + x3 + 0x4 + 2x5 + 5x6 = 0 =⇒ x2 = −2.
T
Thus x0 := 0 −2 0 −3 2 0 is a particular solution.
Basic solutions of Ax = 0: T
x1 = 1, x3 = x6 = 0 gives s1 := 1 0 0 0 0 0 ,
T
x3 = 1, x1 = x6 = 0 gives s3 := 0 −1/2 1 0 0 0 ,
T
x6 = 1, x1 = x3 = 0 gives s6 := 0 −1/2 0 10/3 −2 1 .
36 / 61
Linear System: Conclusion
Proposition
Let A ∈ Rm×n be in REF with r nonzero rows. Then the linear system Ax = 0
has only the zero solution if and only if r = n. In particular, if m < n, then
Ax = 0 has a nonzero solution.
37 / 61
Gauss Elimination Method (GEM)
1 We have seen how to solve the linear system Ax = b when the matrix A is in
a row echelon form (REF).
2 We now explain the Gauss Elimination Method (GEM) by which we can
transform any A ∈ Rm×n to a REF.
3 This involves the following two elementary row operations (EROs):
38 / 61
GEM: Remark
39 / 61
Transformation to REF
1 Let A ∈ Rm×n , that is, let A be an m × n matrix with entries in R. If A = O,
the zero matrix, then it is already in REF.
2 Suppose A 6= O.
i. Let column k1 be the first nonzero column of A, and let some nonzero entry
p1 in this column occur in the jth row of A. Interchange row j and row 1.
Then A is transformed to
0 · · · 0 p1 ∗ · · · ∗
0 · · · 0 ∗ ∗ · · · ∗
A0 := . ,
.. .
.. .
.. .
.. .. .. ..
. . .
0 ··· 0 ∗ ∗ ··· ∗
where ∗ denotes a real number. Note: p1 becomes the chosen pivot in row 1.
(This choice may not be unique.)
iii. Keep row 1 of A00 intact, and repeat the above process for the remaining
(m − 1) × n submatrix of A00 to obtain
0 · · · 0 p1 ∗ ∗ ∗ ∗ ··· ∗
0 · · · 0 0 ··· 0 p2 ∗ ··· ∗
000
A := 0 · · · 0 0 ··· 0 0 ∗ ··· ∗ ,
.. .. .. .. .. .. .. .. .. ..
. . . . . . . . . .
0 ··· 0 0 ··· 0 0 ∗ ··· ∗
Note: p2 becomes the chosen pivot in row 2. (Again, this choice may not be
unique.)
iv. Keep rows 1 and 2 of A000 intact, and repeat the above process till the
remaining submatrix has no nonzero row.
1 The resulting m × n matrix is in REF with pivots p1 , . . . , pr in columns
k1 , . . . , kr , and the last m − r rows are zero rows, where 1 ≤ r ≤ m.
Transformation to REF: Notation
2 Ri ←→ Rj will denote the interchange of the ith row Ri and the jth row Rj
for 1 ≤ i, j ≤ m with i 6= j.
3 Ri + αRj will denote the addition of α times the jth row Rj to the ith row Ri
for 1 ≤ i, j ≤ m with i 6= j.
4 αRj will denote the multiplication of the jth row Rj by the nonzero scalar α
for 1 ≤ j ≤ m.
42 / 61
Transformation to REF
1 Remark: A matrix A may be transformed to different REFs by EROs.
1 3 1 3
2 For example, we can transform A := by EROs to as well as
2 0 0 −6
2 0
to , both of which are REFs.
0 3
0 1 1
3 Example (i). Let A := and b := . Then R1 ←→ R2 gives
1 1 2
T
x := 1 1 as the solution of the linear system Ax = b.
4 Example (ii). Consider the linear system
3x1 + 2x2 + x3 = 3
2x1 + x2 + x3 = 0
6x1 + 2x2 + 4x3 = 6.
43 / 61
Transformation to REF: Examples
1 We can check that
3 2 1 3
3 2 1 3
R2 −(2/3)R1
2 1 1 0 −−−−−−−→ 0 −1/3 1/3 −2
R3 −2R1
6 2 4 6 0 −2 2 0
3 2 1 3
R3 −6R2
−− −−→ 0 −1/3 1/3 −2 .
0 0 0 12
44 / 61
Transformation to REF: Examples
1 We can check that
3 2 2 −5 8
[A|b] = 0.6 1.5 1.5 −5.4 2.7
1.2 −0.3 −0.3 2.4 2.1
2
3 2 2 −5 8
EROs 0 0
−−−−−→ 0 1.1 1.1 −4.4 1.1 =: [A |b ].
0 0 0 0 0
45 / 61
Transformation to REF: Examples
T
1 Thus x0 := 2 1 0 0 is a particular solution.
2 Since r = 2 < 4 = n, the linear system has (infinitely) many solutions.
3 For basic solutions of A0 x = 00 , where 00 = 0,
T
let x3 = 1, x4 = 0, so that s3 := 0 −1 1 0 , and x4 = 1, x3 = 0, so
T
that s4 := −1 4 0 1 .
4 The general solution of A0 x = b0 is given by x = x0 + α3 s3 + α4 s4 ,
46 / 61
REF: Applications to the Linear System
Proposition
Let A ∈ Rm×n . Then the linear system Ax = 0 has only the zero solution if and
only if any REF of A has n nonzero rows. In particular, if m < n, then Ax = 0 has
a nonzero solution.
Proof: We saw that these results hold if A itself is in REF. Since every A ∈ Rm×n
can be transformed to a REF A0 by EROs, and since the solutions of the linear
system Ax = 0 and the transformed system A0 x = 00 , where 00 = 0, are the same,
the desired results hold.
A Challenge Problem: Let A ∈ R9×4 and B ∈ R7×3 . Is there X ∈ R4×7 such that
X 6= O but AXB = O?
47 / 61
Inverse of a Square Matrix
1 We now introduce a special kind of square matrices.
2 Let A be a square matrix of size n ∈ N, that is, let A ∈ Rn×n .
3 We say that A is invertible if there is B ∈ Rn×n such that AB = I = BA,
and in this case, B is called an inverse of A.
4 Examples
1 0 0 1
The matrix A := is invertible. To see this, let B := , and
0 2 0
1/2
1 0
check AB = I = BA. On the other hand, the nonzero matrix A := is
0 0
not invertible.
5 If A is invertible, then it has a unique inverse.
6 In fact, if AC = I = BA, then C = IC = (BA)C = B(AC) = BI = B by the
associativity of the matrix multiplication.
7 If A is invertible, its inverse will be denoted by A−1 , and so
A−1 A = I = AA−1 . Clearly, (A−1 )−1 = A.
48 / 61
Inverse of a Square Matrix
1 If A is invertible and if one can guess its inverse, then it is easy to verify that
it is in fact the inverse of A. Here are two easy examples.
Proposition
Let A be a square matrix. Then A is invertible if and only if AT is invertible. In
this case, (AT )−1 = (A−1 )T .
49 / 61
Inverse of a Square Matrix
Proposition
Let A and B be square matrices. If A and B are invertible, then the product AB
is invertible and then (AB)−1 = B−1 A−1 .
and
(AB)(B−1 A−1 ) = A(BB−1 )A−1 ) = AA−1 = I.
50 / 61
Elementary Matrices
1 Definition: An elementary matrix (of a particular type) is a matrix obtained
from the identity matrix by a single elementary row operation (of that type).
2 For example,
1
..
.
0 1
Ti,j =
. .. = I + eij + eji − eii − ejj
1 0
..
.
1
is an elementary matrix of type I, where eij is the square matrix of same size
for which the (i, j)th entry is 1 and all other entries are 0.
3 Note that
Ti,j · A is the matrix produced by exchanging row i and row j of A.
−1
Ti,j = Ti,j .
51 / 61
Elementary Matrices
1 The matrix
1
..
.
1
Ti,j (α) =
.. = I + αeij
.
α 1
..
.
1
52 / 61
Elementary Matrices
1 The matrix
1
..
.
1
Ti (α) = α = I + (α − 1)eii , α 6= 0
1
..
.
1
is an elementary matrix of type III.
2 Note that
Ti (α) · A is the matrix produced from A by multiplying row i by α.
Ti (α)−1 = Ti (1/α).
3 We have proved the following result:
Lemma
An elementary matrix is invertible and the inverse is also an elementary matrix (of
the same type).
53 / 61
Row Canonical Form (RCF)
1 As we have seen, a matrix A may not have a unique REF. However, a special
REF of A turns out to be unique.
2 An m × n matrix A is said to be in a row canonical form (RCF) or a
reduced row echelon form (RREF) if
i. it is in a row echelon form (REF),
ii. all pivots are equal to 1 and
iii. in each pivotal column, all entries above the pivot are (also) equal to 0.
54 / 61
Row Canonical Form (RCF)
55 / 61
Row Canonical Form (RCF)
1 Example
−2 1 3 −2 0 2 0
1 3 0 2 0
2 6 −5 −2 4 −3EROs 0 0 −1 −2 0 −3
0 −−−−→ ,
0 5 10 0 15 0 0 0 0 0 6
2 6 0 8 4 16 0 0 0 0 0 0
which is in REF
1 3 0 4 2 6 1 3 0 4 2 0
EROs 0 0 1 2 0 3−EROs
0 0 1 2 0 0
−−−−→ −−−→
0 0 0 0 0 6 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0
which is in RCF.
56 / 61
An Important Criterion for invertible Matrices
Theorem
Let A be a square matrix. Then the following are equivalent:
(a). A can be reduced to I by a sequence of elementary row operations.
(b). A is a product of elementary matrices.
(c). A is invertible.
(d). The system Ax = 0 has only the trivial solution x = 0.
1 Proof. Exercise.
2 Note: The above result is a definite improvement over requiring the existence
of a matrix B satisfying both BA = I and AB = I for the invertibility of a
square matrix A.
3 Remark: Suppose an n × n square matrix A is invertible. In order to solve the
linear system Ax = b for a given b ∈ Rn×1 , we may transform the augmented
matrix [A|b] to [I | c] by EROs.
4 Now Ax = b ⇐⇒ Ix = c for x ∈ Rn×1 . Hence Ac = b.
5 Thus c is the unique solution of Ax = b.
6 This observation is the basis of an important method to find the inverse of a
square matrix.
58 / 61
Gauss-Jordan Method for Finding the Inverse of a Matrix
1 Gauss-Jordan Method for Finding the Inverse of a Matrix:
2 Let A ∈ Rn×n be an invertible matrix.
3 Consider the basic column vectors e1 , . . . , en ∈ Rn×1 .
4 Then e1 · · · en = I.
5 Let c1 , . . . , cn be the unique elements of R n×1 such that
Ac1 = e1 , . . . , Acn = en , and define C := c1 · · · cn .
6 Then
AC = A c1 ··· cn = Ac1 ··· Acn = e1 ··· en = I.
60 / 61
Gauss-Jordan Method: Example
−1 1 2
1 0 0 −1 1 2
1 0 0
3 −1 1
0 1 0 −→ 0 2 7
3 1 0 −→
−1 3 4 0 0 1 0 2 2 −1 0 1
−1 1 2 1 0 0
1 −1 −2
−1 0 0
0 2 7 3 1 0−→ 0 1 3.5 1.5 0.5 0
0 0 1 0.8 0.2 −0.2
0 0 −5 −4 −1 1
1 −1 0
0.6 0.4 −0.4 1 0 0
−0.7 0.2 0.3
−→ 0 1 0
−1.3 −0.2 0.7 −→ 0 1 0
−1.3 −0.2 0.7 .
0 0 1 0.8 0.2 −0.2 0 0 1 0.8 0.2 −0.2