Download as pdf or txt
Download as pdf or txt
You are on page 1of 61

Lecture

Applied math in economics

–Lecturer: Đặng Thị Tố Như–

University of Economics

Đà Nẵng, 2023

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 1/1


Lecturer: Tố Như (DUE) Đà Nẵng, 2023 2/1
Outcomes

After chapter 1, students have knowledge on:


1 Definition matrices.
2 Addition, subtraction, transposing of matrices.
3 Matrix multiplication.
4 Determinant of a square matrix
5 Inverse of a square matrix
6 Rank of a matrix

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 3/1


Chapter1. Matrix
Definition
With m, n ∈ N, a real-value (m,n) matrix A is a m × n-tuple of elements
aij , i = 1, . . . , m, j = 1, . . . , n, which is ordered according to a
rectangular scheme consisting of m rows and n columns:
 
a11 a12 . . . a1n
 a21 a22 . . . a2n 
A=  . . . . . . . . . . . .  , aij ∈ R

am1 am2 . . . amn

We can write A = (aij )m×n or A = [aij ]m×n , the order of A is m by


n.
By convention (1, n)-matrices are called rows and (m, 1)-matrices
are called columns. These special matrices are also called
row/column vectors.
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 4/1
Examples
 
A= 2 3 4
is a row vector and also a 1 × 3 matrix. Some elements of A:
a11 = 2, a12 = 3, a13 = 4.
 
2
1
B = 
5
4
is a column vector and also a 4 × 1 matrix
 
2 3 4
C=
1 5 7
is a 2 by 3 (2 × 3) matrix
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 5/1
Some special matrices (cont.)

A null matrix: is a matrix whose all elements are 0.


We denote:
 
0 0 ... 0
 0 0 ... 0 
0m×n = ... ... ... ...

0 0 ... 0

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 6/1


Some special matrices (cont.)

A square matrix: is defined as a matrix that has an equal number of


rows and columns ( an n by n matrix)
 
a11 a12 . . . a1n
a21 a22 . . . a2n 
A= 
. . . . . . . . . . . .
an1 an2 . . . ann
Leading diagonal of a square matrix: The diagonal from the top left
corner to the bottom right corner of a square matrix is called the
main diagonal or leading diagonal: a11 , a22 , . . . , ann .

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 7/1


Some special matrices (cont.)

A diagonal matrix: is a square matrix that has aij = 0 for all i 6= j.


We denote:  
a11 0 ... 0
 0 a22 ... 0 
A=  ... ... ... ... 

0 0 ... ann

An identity matrix: is a diagonal matrix that has elements on the


leading diagonal equal to 1. We denote E or I:
 
1 0 ... 0
 0 1 ... 0 
In =  
... ... ... ...
0 0 ... 1

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 8/1


Some special matrices (cont.)
A matrix is in row echelon form (ref) when it satisfies the
following conditions
• The first non-zero element in each row, is called the leading
entry.
• Each leading entry is in a column to the right of the leading entry
in the previous row.
• Rows with all zero elements, if any, are below rows having a
non-zero element.
Example
 
    1 0 4 3 4
2 1 3 1 0 4 0
0 1 4 , 0 0 2 ,  0 3 6 5,
0 0 0 4 9
0 0 7 0 0 0
0 0 0 0 7

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 9/1


Some special matrices (cont.)

Transpose of a matrix: is a matrix which is formed by turning all


the rows of a given matrix into columns and vice-versa
(interchanging its rows into columns or columns into rows).
If A is the given matrix, then the transpose of the matrix is
represented by A0 or AT .
The transpose of A = [aij ]m×n is AT = [aji ]n×m
 
a11 a21 ... ai1 ... am1
a12 a22 ... ai2 ... am2 
 
T
 ... ... ...... ... ... 
A =  a1j a2j ... aij ... amj 

 
 ... ... ...... ... ... 
a1n a2n ... ain ... amn

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 10 / 1


Some special matrices (cont.)
A triangular matrix: is a square matrix in which elements below
and/or above the diagonal are all zeros.
We have mainly two types of triangular matrices:
Upper triangular matrix: aij = 0 for all i > j.
 
a11 a12 . . . a1n
 0 a22 . . . a2n 
A= 
. . . . . . . . . . . . 
0 0 . . . ann

Lower triangular matrix: aij = 0 for all i < j.


 
a11 0 ... 0
a21 a22 ... 0 
A= . . .

... . . . . . .
an1 an2 . . . ann
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 11 / 1
Matrix operations
Let A and B be two m × n real matrices.
Matrix comparison: A=B if aij = bij for i = 1, . . . , m, j = 1, . . . ,
n.
Matrix addition: The sum of the matrices A, B is an m × n matrix,
C, whose entries are cij = aij + bij , i = 1, . . . , m, j = 1, . . . , n.
A = [aij ]m×n , B = [bij ]m×n , A + B = [aij + bij ]m×n

Example
     
1 2 4 4 3 2 5 5 6
+ =
2 1 0 5 7 2 7 8 2

Properties:
I A+B=B+A, A+0=0+A
I A+(-A)=0 for −A = [−aij ]m×n , A+(B+C)=(A+B)+C

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 12 / 1


Matrix operations
Matrix subtraction: The difference A − B is an m × n matrix, C,
whose entries are cij = aij − bij , i = 1, . . . , m, j = 1, . . . , n.
Matrix scalar multiplication: refers to the product of a real number
(scalar) and a matrix.
In scalar multiplication, each entry in the matrix is multiplied by the
given scalar:
A = [aij ]m×n , k ∈ R, kA = [kaij ]m×n

Example
     
3 4 2.3 2.4 6 8
2. = =
7 1 2.7 2.1 14 2

Properties:
I k(A+B)=kA+kB, (k+h)A=kA+hA , k(hA)=(kh)A
I 1.A=A, 0.A= 0
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 13 / 1
Matrix operations (cont.)-Matrix multiplication

Definition
(Matrix multiplication) Let A = [aij ]m×n , B = [bjk ]n×p . The matrix
multiplication A × B is an m × p real matrix, C, whose entries cik for
i = 1, . . . , m, k = 1, . . . , p,are obtained
 as follows:
b1k
 b2k  P n
cik = ai1 ai2 ... ain ∗   ...  j=1 aij bjk , 1 ≤ i ≤ m, 1 ≤ k ≤ p.
=

bnk

• The matrix multiplication, A × B, requires the number of columns of


the matrix A to be equal to the number of rows of the matrix B.

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 14 / 1


Examples - Matrix multiplication

1
 
  1 1  
1 2 3  −2 19
. 0 3 =
−1 0 4 −5 15
−1 4

2
 
  2 1 7 6
2 5 7
A= , B = 8 4 1 5
1 3 2
1 9 3 2

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 15 / 1


Matrix operations - Matrix multiplication

Properties of matrix multiplication


1 (AB)C = A(BC )
2 A(B + C ) = AB + AC , (A + B)C = AC + BC
3 α(AB) = (αA)B = A(αB)
4 (AB)T = B T AT
5 Ik = I
6 If A = [aij ]m×n then AIn = A, Im A = A
7 AB 6= BA.

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 16 / 1


Basic elementary transformation of a matrix

The three basic elementary operations or transformation of a matrix are


as follows:
(i1 )∼(i2 )
Interchanging any two rows or two columns: A −−−−→ B
Multiplication of the elements of a row or a column by a non-zero
(i):=k∗(i)
number k 6= 0: A −−−−−→ B
k6=0
Multiplication of the elements of a row or a column by a non-zero
number k 6= 0 and add the result to the other row or column:
(i1 ):=(i1 )+α∗(i2 )
A −−−−−−−−−→ B

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 17 / 1


Objective

1 Definition of determinant of a square matrix and related concepts.


2 Properties of determinant.
3 How to calculate determinant of a square matrix

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 18 / 1


Determinant of a matrix

Let A be a square matrix: A = [aij ]n×n .


A sub-matrix of A is a matrix obtained from A by removing any
number of rows and/or columns from A.
Let aij be the element in the i th row and the j th column of A.
Sij is a matrix obtained by removing the i th row and the j th column
of A.
We call Sij be a sub-matrix of A relevant to aij .

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 19 / 1


Determinant of a matrix (cont.)

Example
 
1 2 3
Let A be a square matrix: A = 4 5
 6 Then we can find some
7 8 9
sub-matrices of A as follows:
     
5 6 4 6 4 5
S11 = , S12 = , S13 = ,
8 9 7 9 7 8
     
2 3 1 3 1 2
S21 = , S22 = , S23 = ,
8 9 7 9 7 8
     
2 3 1 3 1 2
S31 = , S32 = , S33 = ,
5 6 4 6 4 5

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 20 / 1


Determinant
Definition
Determinant of a square matrix A of order n, denoted det(A) or |A|, is
a real number defined by induction as follows:
n = 1, A = [a11 ]: det(A) = |A| = a11 .
 
a11 a12
n = 2, A = → detA = a11 a22 − a12 a21
a21 a22
n ≥ 3, |A| can be found out by expanding along any row i of A.
n
X
det(A) = |A| := aij (−1)i+j Mij
j=1

for i = 1, . . . , n, in which, Mij = |Sij |. Mij is called the minor of aij .


Note: a minor of a matrix A is the determinant of some smaller
square matrix, cut down from A by removing one or more of its
rows
Lecturer: and
Tố Nhưcolumns.
(DUE) Đà Nẵng, 2023 21 / 1
Properties of determinants

Property 1
det(AT ) = detA.
Corollary:
A property of determinants that is true for rows is also true for
columns.
|A| can be found out by expanding along any column j of A.
n
X
det(A) = |A| := aij (−1)i+j Mij (1)
i=1

for i = 1, . . . , n, in which, Mij is the minor of aij .

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 22 / 1


Properties of Determinants (cont.)

Property 2
The interchange of any two rows (or columns) of the determinant
(i1 )∼(i2 )
changes its sign: A −−−−→ B → detA = −detB .

Example
     
4 6 1 2 5 2 2 2 5
Let A = 2 5 2 , B = 4 6 1 , C = 4 1 6 . Then
9 0 4 9 0 4 9 4 0
|B| = −|A|, |C | = |A|.

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 23 / 1


Properties of determinants (cont.)

Property 3
If all the elements of a row (or column) are zero, then the determinant is
zero

Property 4
If all elements of a row (or column) are identical to the elements of
some other row (or column), then the determinant is zero.

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 24 / 1


Properties of determinants (cont.)
Property 5
If all the elements of a row (or column) of a determinant are multiplied
by a non-zero constant, then the determinant gets multiplied by the
same constant.

Example
Let A, B, C be three matrices as follows:
     
4 6 1 4 6 1 4 18 1
A= 2 5
 2 , B = 4 10 4 , C = 4 30 4
9 0 4 9 0 4 9 0 4

then
|B| = 2|A|, |C | = 6|A|.
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 25 / 1
Properties of determinants (cont.)

Property 6
If all elements of a row (or column) are proportional to the elements of
some other row (or column), then the determinant is zero.

Example
Let A be as follows:
   
4 6 1 3 6 1
A = 8 12 2 , B =  6 5 2 .
9 0 4 12 0 4

Then
|A| = |B| = 0.

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 26 / 1


Properties of determinants (cont.)
Property 7
If all the elements of a row (column) of a matrix A can be written as the
sum of two terms then the determinant can be decomposed into the
sum of two determinants.

Example
Let A, B, C be three matrices as follows:
     
4 6 1 2 1 3 6 7 4
A = 2 5 2 , B = 2 5 2 , C = 2 5 2 .
9 0 4 9 0 4 9 0 4
 
4+2 6+1 1+3
Then |C | =  2 5 2  = |A| + |B|.
9 0 4
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 27 / 1
Properties of determinants (cont.)

Property 8
Multiplication of row or column by a non-zero number k 6= 0 and add
(i1 ):=(i1 )+k∗(i2 )
the result to the other row or column: A −−−−−−−−−→ B then |A| = |B|.

Example
Given the matrix A:
   
2 1 (r1 ):=(r1 )−2∗(r2 ) 2 1
A= −−−−−−−−−→ B = ⇒ |B| = |A| = 6
4 5 0 3

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 28 / 1


Properties of Determinants (cont.)

Property 9
If Matrix A has one row (column) which is a linear combination of other
rows (columns) then |A| = 0.

Example
Given the matrix A below:
 
5 −10 0
A = 2 5 2 ,
9 0 4

then |A| = 0 because (r1 ) = −2 ∗ (r2 ) + (r3 ).

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 29 / 1


Properties of Determinants (cont.)
Property 10
The determinant of a triangular matrix is equal to the product of
diagonal elements.  
a11 a12 ... a1n
 0 a22 ... a2n 
A= . . . . . .

... . . .
0 0 ... ann
Then
|A| = a11 .a22 .ann

Property 11
The determinant of a product of square matrices of the same order is
equal to the product of their determinants.

det(AB) = det(BA) = det(A) ∗ det(B)


Lecturer: Tố Như (DUE) Đà Nẵng, 2023 30 / 1
Determinant of a 3 × 3 matrix: Sarrus method
 
a11 a12 a13
Let A be a 3 × 3 matrix: A = a21 a22 a23  .
a31 a32 a33
To find the determinant of A, duplicate the first two columns of the
matrix to the right of its third column:

Add the products of the main diagonals going from top to bottom,
subtract the products of the main diagonals going from bottom to
top.
|A| =
(a11 a22 a33 +a12 a23 a31 +a13 a21 a32 )−(a31 a22 a13 +a32 a23 a11 +a33 a21 a12 )
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 31 / 1
Determinant of a 3 × 3 matrix: Sarrus method.
Examples
1. Find the determinant of D:
1 3 5
D= 2 4 6
1 3 0

Solution
Applying Sarrus method, we have:

1 3 5|1 3
D = 2 4 6|2 4 = 1.4.0 + 3.6.1 + 5.2.3 − 1.4.5 − 3.6.1 − 0.2.3 = 10
1 3 0|1 3

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 32 / 1


Calculating the determinant of a square matrix
1. Expanding along any row/column of the matrix
Example
Calculate the determinant of the following matrix:

1 1 2 2
−3 1 5 1
D=
−2 5 0 0
2 −1 3 −1

Expanding along the 3th row of A, we get:


D = (−1)3+1 .(−2).M31 + (−1)3+2 .5.M32
1 2 2 1 2 2
= −2 1 5 1 − 5 −3 5 1 = −2.8 − 5.(−48) = 224
−1 3 −1 2 3 −1
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 33 / 1
Calculating the determinant of a square matrix
(cont.)

2. Transforming the matrix into a triangular matrix by basic elementary


transformation link : determinant is the product of all diagonal elements
of the triangular matrix.
   
b11 b12 ... b1n b11 0 ... 0
 0 b22 ... b2n 
 or B = b21 b22 ... 0  .
 
A→B =  ... ... ... ...   ... ... ... ... 
0 0 ... bnn bn1 bn2 ... bnn
⇒ |A| = |B| = b11 b22 ...bnn .

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 34 / 1


Calculating the determinant (cont.) - Example

Example
1 3 5
Find the determinant of the following matrix: D = 2 4 6
1 3 0

Applying the transformation r3 → r1 .(−1) + r3 , r2 → r1 .(−2) + r2 , we


get:
1 3 5
D = 0 −2 −4 = 1.(−2).(−5) = 10
0 0 −5

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 35 / 1


Calculating the determinant (cont.) - Example
Example
 
1 −2 3 2 −5
2 1 2 −1 3 
 
Find the determinant of the matrix D = 
 1 4 2 0 1 

3 5 2 3 3
1 4 3 0 −3

Let us transform
r2 → r2 + r1 .(−2), r3 → r3 + (−1)r1 , r4 → r4 + (−3).r1 , r5 → r5 + (−1).r1 :

1 −2 3 2 −5
0 5 −4 −5 13
|D| = 0 6 −1 −2 6
0 11 −7 −3 18
0 6 0 −2 2
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 36 / 1
Calculating the determinant - Example (cont.)
To simplify, we continue to transform
r2 → r2 + (−1).r3 , r4 → r4 + (−2).r3 , r5 → r5 + (−1).r3
1 −2 3 2 −5
0 −1 −3 −3 7
|D| = 0 6 −1 −2 6
0 −1 −5 1 6
0 0 1 0 −4
r3 → r3 + 6.r2 , r4 → r4 + (−1).r2
1 −2 3 2 −5
0 −1 −3 −3 7
|D| = 0 0 −19 −20 48
0 0 −2 4 1
0 0 1 0 −4

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 37 / 1


Calculating the determinant - Example (cont.)
Convert r3 → r3 + 19.r5 , r4 → r4 + 2.r5 , r3 ↔ r5 :
1 −2 3 2 −5
0 −1 −3 −3 7
|D| = − 0 0 1 0 −4
0 0 0 4 −9
0 0 0 −20 −28
Then r5 → r5 + 5.r4
1 −2 3 2 −5
0 −1 −3 −3 7
|D| = 0 0 1 0 −4
0 0 0 4 −9
0 0 0 0 −73
= 1.(−1).1.4.(−73) = −292
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 38 / 1
Exercises
Find the determinants:
1

5 6 7
A = 2 4 −1
1 3 5
2

1 1 1 1
1 2 3 4
B=
1 4 9 6
1 8 27 64
3

2 1 1 1 1
1 3 1 1 1
C= 1 1 4 1 1
1 1 1 5 1
1 1 1 1 6
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 39 / 1
Inverse matrix

Definition
Let A = [aij ]n×n be a n × n square matrix. If there exists an n × n square
matrix B such that A.B = B.A = In , where In is the identity matrix of
order n × n, then A is invertible and B is called the inverse matrix of A.
We denote B by A−1 .

Theorem
If A is invertible, then its inverse is unique.

Theorem
An n × n square matrix A is invertible if and only if detA 6= 0 (A is
called a non-singular square matrix).

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 40 / 1


Inverse of a matrix - Using cofactor method

For each element aij of A, Cij = (−1)i+j Mij is called cofactor of aij ,
where Mij is the minor of aij .
C = (cij )n×n is called the cofactor matrix of A.
Find inverse matrix of A:
Calculate |A|.
If |A| = 0, then A is not invertible.
If |A| =
6 0 (A then is called a non singular matrix), using the
cofactor matrix.

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 41 / 1


Inverse of a matrix (cont.) - Using cofactor method
(cont.)

Step 1: Determine the minors of all elements of A.


Step 2: Next, compute the cofactors of all elements and build the
cofactor matrix C by substituting the elements of A with their
respective cofactors.
Step 3: Take the transpose C T of C.
1 1
Step 4: Multiply C T by |A| , we get A−1 = |A| .C T .
 
C11 C21 . . . Cn1
1 T 1  C12 C22 . . . Cn2 
A−1 = .C = . .
|A| |A|  . . . . . . . . . . . . 
C1n C2n . . . Cnn

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 42 / 1


Inverse of a matrix - Examples
Example
Find the inverse matrix of the following matrix:
 
1 2
A=
3 4

Solution
We have detA = −2 6= 0.

c11 = (−1)1+1 |4| = 4, c12 = (−1)1+2 |3| = −3


c21 = (−1)2+1 |2| = −2, c22 = (−1)2+2 |1| = 1
 
−1 −2 1
A =
3/2 −1/2

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 43 / 1


Inverse of a matrix - Examples (cont.)

Example
Find the inverse matrix of the following matrix:
 
1 2 3
A= 2 5
 3
1 0 8

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 44 / 1


Inverse of a matrix - Examples
Solution
We have detA = −1 6= 0.

5 3 2 3
C11 = (−1)1+1 = 40, C12 = (−1)1+2 = −13
0 8 1 8
C13 = −5, C21 = −9, C22 = 5, C23 = 2, C31 = −9, C32 = 3, C33 = 1 The
cofactor matrix of A:
 
40 −16 −9
C = −13 5 3
−5 2 1
Therefore, the inverse matrix is as follows:
   
40 −16 −9 −40 16 9
C 1 
A−1 = = −13 5 3  =  13 −5 −3
detA −1
−5 2 1 5 −2 −1
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 45 / 1
Inverse matrix - Using basic elementary row
transformations

To find the inverse matrix of a n × n square matrix A :


Step 1: Calculate |A|, if |A| = 0 then A is not invertible, if |A| =
6 0,
move to step 2.
Step 2: Add the n × n identity matrix In to the right hand side of A,
we get the matrix [A|In ].
Step 3: Using elementary row transformations for the matrix [A|In ]
link until we get [I |B], then B = A−1 .
n

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 46 / 1


Properties of inverse matrices

Properties
If A and B are two invertible square matrices of the same order then:
(kA)−1 = k1 A−1
(A.B)−1 = B −1 A−1
(A−1 )−1 = A
(Am )−1 = (A−1 )m

Applications
AX = B → X = A−1 B
XA = B → X = BA−1
AXB = C → X = A−1 CB −1

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 47 / 1


Examples

1. Find the inverse of the matrix using elementary operations :


 
1 2 3
A = 2 5 3
1 0 8

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 48 / 1


Examples (cont.)

Solution

   
1 2 3 | 1 0 0 1 2 3 | 1 0 0
r3 :=(−1)r1 +r3
2 5 3 | 0 1 0 −
−−−−−−−→ 0 1 −3 | −2 1 0
r2 :=(−2)r1 +r2
1 0 8 | 0 0 1 0 −2 5 | −1 0 1
 
1 2 3 | 1 0 0
r3 :=2r2 +r3
−− −−−−→ 0 1 −3 | −2 1 0
0 0 −1 | −5 2 1

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 49 / 1


Examples (cont.)

 
1 2 0 | −14 6 3
r1 :=3r3 +r1
−−−−−−−→ 0  1 0 | 13 −5 −3
r2 :=−3r3 +r2
0 0 −1 | −5 2 1
 
1 0 0 | −40 16 9
r3 :=−h3
−−−−−−−→ 0  1 0 | 13 −5 −3
r1 :=−2r2 +r1
0 0 1 | 5 −2 −1
Then  
−40 16 9
A−1 =  13 −5 −3
5 −2 −1

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 50 / 1


Rank of a matrix

Definition
Let A = (aij )m×n be a m × n matrix. Rank of A is defined as follows:
A = O then rank of A is 0 by convention.
A 6= O, then rank of A is equal to r if:
I There exists a square sub-matrix of order r of A that its
determinant is not equal to 0.
I All determinants of A’s square sub-matrices of order larger than r
(if any) are 0.
We denote rank of A by rank(A) or r(A).

Note
If an n × n matrix A has a non-zero determinant then r(A)=n.

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 51 / 1


Rank of a matrix (cont.)

Properties
Let A = (aij )m×n , B = (bij )m×n . Then
0 ≤ r (A) ≤ min(m, n)
r (A) = r (AT )
The sum of two matrices A and B of same order has a rank that is
less than or equal to the sum of their individual ranks

r (A + B) ≤ r (A) + r (B)

Elementary row transformations do not change r(A).


If A is in row echelon form then r(A) is the number of non-zero
rows of A link .

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 52 / 1


How to find the rank of a matrix - Using
elementary transformations (row/column)
To find the rank of a matrix A:
Using elementary transformations link to convert A into row
echelon form (matrix B), in this process, we can eliminate all zero
rows/columns:
 
b11 b12 . . . b1r ... b1n
 0 b22 . . . b2r ... b2n 
 
. . . . . . . . . . . . ... . . .
B =0

 0 . . . brr ... brn 
0 0 ... 0 ... 0
0 0 ... 0 ... 0

in which B satisfies bii 6= 0, ∀i = 1, . . . , r .


Then r (B) = r (A) = r .
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 53 / 1
Converting a matrix into row echelon form

Step 1: Identify the first pivot (the leading entry (the first non-zero)
of 1st row) of the matrix.
I In general, the first pivot is the top left entry, unless, swap rows
until the top left entry is non-zero.
Step 2: Perform row operations on the matrix to obtain 0’s below
the first pivot.
Step 3: Identify the second pivot of the matrix. It can either be the
middle or the middle bottom entry.
Step 4: Perform row operations on the matrix to obtain 0’s below
the second pivot.
Step 5: In general, keep identifying your pivots. Row-reduce so that
the entries below the pivots are 0.

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 54 / 1


Rank of a matrix - Examples(cont.)

Example
Find the rank of following matrix
 
3 2 4 1
A = 1 −1 3 −3
1 1 1 1

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 55 / 1


Rank of a matrix - Examples (cont.)

Solution
   
1 1 1 1 1 1 1 1
r1 ↔r3 r2 :=(−1).r1 +r2
A −− −→ 1 −1 3 −3 −−−−−−−−→ 0 −2 2 −4
r3 :=(−3).r1 +r3
3 2 4 1 0 −1 1 −2
 
1 1 1 1
r3 :=(−1/2).r2 +r3
−−−−−−−−−→ 0 −2 2 4
0 0 0 0
It follows that r(A)=2

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 56 / 1


Rank of a matrix - Examples (cont.)

Example
 
1 2 −1 0
Find the rank of A: A = −1 2 4 2
3 −6 −3 0

Solution
Using elementary transformations to convert A into row echelon form:
 
1 2 −1 0
r2 :=r2 +r1
A −−−−−−→ 0 4 3  2
r3 :=r3 −3r1
0 0 0 0

It follows that A: rank(A) = 2.

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 57 / 1


Rank of a matrix - Examples(cont.)
Example
 
1 3 2
Find the rank of A for different values of m: A = 2 1 m , m ∈ R.
3 8 5

Solution
Using elementary transformations to convert A into row echelon form:
   
1 3 2 1 3 2
r2 :=r2 −2r1 r3 :=5r3 −r2
A −− −−−−→ 0 −5 m − 4 −− −−−−→ 0 −5 m − 4 
r3 :=r3 −3r1
0 −1 1 0 0 −1 − m

If m = −1 then rank(A) = 2.
6 −1 then rank(A) = 3.
If m =
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 58 / 1
Rank of a matrix - The minor method
The minor method
Pick an element of the matrix which is not 0.
Calculate the order 2 minors link which contain that element until
we find a minor which is not 0.
If every order 2 minor is 0, then the rank of the matrix is 1.
If there is any order 2 minor which is not 0, we calculate the order 3
minors which contain the previous minor until we find one which is
not 0.
If every order 3 minor is 0, then the rank of the matrix is 2.
If there is any order 3 minor which is not 0, we calculate the order 4
minors until we find one which is not 0.
We keep doing this until we get minors of an order equal to the
smallest number out of the number of rows and the number of
columns.
Lecturer: Tố Như (DUE) Đà Nẵng, 2023 59 / 1
The minor method - Examples

Example
Find the rank of A, using the minor method:
 
1 2 4
A=
3 6 5

Solution
We have r (A) ≤ min(2, 3) = 2.
We pick any element which is not 0, for example a11 = 1, |a11 | = 1 6= 0.
We form and compute order 2 minors containing 1:

1 2 1 4
|A12
12 | = = 0, |A13
12 | = = −15 6= 0
3 6 3 5

It follows that r(A)=2.


Lecturer: Tố Như (DUE) Đà Nẵng, 2023 60 / 1
Exercises

1 Find the inverse of following matrices (if any):


 
  1 3 −5 7
1 2 2 0 1 2 −3
a)A = 2 1 −2 , b)B = 

0 0 1

2
2 −2 1
0 0 0 1

2 Find the rank of following matrix:


 
1 3 5 −1
2 −1 −3 4 
C = 5 1 −1 7 

7 7 9 1

Lecturer: Tố Như (DUE) Đà Nẵng, 2023 61 / 1

You might also like