0% found this document useful (0 votes)
28 views20 pages

Differentiation All Formula

ALL FORMULA

Uploaded by

rafsan4576
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views20 pages

Differentiation All Formula

ALL FORMULA

Uploaded by

rafsan4576
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Matrices, Vectors and Fourier Analysis Summer 2023-2024

Chapter-1
Matrices
In mathematics, a matrix is a rectangular array of numbers, symbols, or expressions, arranged in
rows and columns. Matrices play a huge role in graphics, any image is a matrix and each digit
represents the intensity of a certain color at a certain grid point. Matrices are useful in any big data
task, since a lot of the input data to problems is a collection of vectors (aka a matrix) relating
multiple data points. Neural Networks rely heavily on matrices and matrix operations.
Cryptography is the science of information security. Cryptography involves encrypting data so
that a third party cannot intercept and read the data. In this cryptography matrix is a must which is
very essential in engineering. In engineering, math reports are recorded using matrices. In
architecture, matrices are used with computing. Software and hardware graphics processor use
matrices for performing operations such as scaling, translation, reflection and rotation. A person
working in the field of AI who doesn’t know matrix algebra is like a politician who doesn’t know how
to persuade. In machine learning, we often have to deal with structural data, which is generally
represented as a table of rows and columns, or a matrix. A lot of problems in machine learning can
be solved using matrix algebra. Transformation matrix plays an important role in robotics.

Matrix:
Rectangular arrays of numbers enclosed by   , ( ) and is called matrix.

A = ( aij ) , or  aij  , or aij .

here, i = 1, 2,3, m and j = 1, 2,3, n

 a11 a12 . . . a1n 


 
 a21 a22 . . . a2 n 
 . . . . . . 
i.e. A =  
 . . . . . . 
 . . . . . . 
 
 am1 am 2 . . . amn 

The number aij is called the element or entry of the matrix.


The size of a matrix is described in terms of the number of rows (horizontal lines) and columns
(vertical lines) it contains. To address the matrix size, it is called 𝑚 × 𝑛 or 𝑚 by 𝑛 size. In the size
description, the 1st number always denotes the number of rows and 2nd denotes the number of
column.
Matrices are generally denoted by capital letter 𝐴, 𝐵 etc. Square brackets “[ ]” or curve brackets “(
)” are used for the matrices notation.
The entry that occurs in row 𝑖 and column 𝑗 of a matrix will be denoted by 𝑎𝑖𝑗 . A general 𝑚 × 𝑛
matrix can be denoted as [ aij ] m n or [ aij ] .

1
Matrices, Vectors and Fourier Analysis Summer 2023-2024

Example: Some examples of matrices are


1 2
3 × 2 ordered matrix (or matrix of order 3 by 2): (−3 3) ;
2 0
2 0 1
3 × 3 ordered matrix (or matrix of order 3 by 3 matrix): (−3 3 0) ;
1 −1 0

1 × 4 ordered matrix (or matrix of order 1 by 4 matrix): (1 4 5 0);

3
2 × 1 ordered matrix (or matrix of order 2 by 1 matrix): ( ) ;
2

1 × 1 ordered matrix (or matrix of order 1 by 1 matrix): (5);

Classification of matrices:
A classification of matrices is, in a broad sense, as follows:

Matrix

Rectangular Square

Singular Nonsingular

Rectangular matrix:

A matrix will be rectangular if it has 𝑚 rows and 𝑛 columns where 𝑚 ≠ 𝑛.


2 3 4
Example: ( )
5 6 7
Square matrix:
A matrix in which the number of rows is equal to the number of columns is called a square matrix.
Thus a m n matrix will be a square matrix if 𝑚 = 𝑛 and it will be referred as a square matrix of
order 𝑛. The following matrix is square.

2
Matrices, Vectors and Fourier Analysis Summer 2023-2024

 a11 a12 . . . a1n 


 
 a21 a22 . . . a2 n 
 . . . . . . 
A= 
 . . . . . . 
 . . . . . . 
 
 an1 an 2 . . . ann 

The entries 𝑎11 , 𝑎22 , … , 𝑎𝑛𝑛 are called the main diagonal entries of 𝐴.
Singular matrix:
The square matrix 𝐴 is said to be singular if and only if (iff) its determinant is zero,
i.e., det(𝐴) = 0.
Nonsingular matrix:
The square matrix 𝐴 is said to be nonsingular if det(𝐴) ≠ 0.
Row and Column matrices:
A row matrix is defined as a matrix having a single row and a column matrix is a matrix having a
single column.

Example: ( a11 . . . . a1n ) is a row matrix.


 a11 
 
 a21 
 . 
Example:   is a column matrix.
 . 
 . 
 
 am1 
Equal matrix:
Two matrices are said to be equal if they have the same order and their corresponding entries are
equal.
 x y  2 1
Example: A =  , B =  . If 𝑥 = 2, 𝑦 = 1, 𝑧 = 3, 𝑡 = 5 , that is corresponding entries
z t   3 5
are equal.

Diagonal matrix:
A square matrix is said to be diagonal if 𝑎𝑖𝑗 = 0; 𝑖 ≠ 𝑗 and 𝑎𝑖𝑖 ≠ 0.

3
Matrices, Vectors and Fourier Analysis Summer 2023-2024

Unit matrix or identity matrix:


A square matrix is called a unit matrix or an identity matrix if only diagonal elements of the
matrix are one. A unit matrix of order 𝑛 is written as 𝐼𝑛 .
1 0
Thus I n =   is unit matrix of order 2. So, a i j = 0, i  j and a i j = 1, i = j
0 1
Transpose of a matrix:

The matrix obtained by interchanging rows and columns of a matrix 𝐴, is called the transpose of
𝐴, denoted by 𝐴𝑇 .
3 2 
If A =  4 1  then AT = 
3 4 7 

 7 −5   2 1 −5  2 3
 3  2
Symmetric matrix:
A symmetric matrix is a square matrix that is equal to the transpose of that matrix. Symmetric
matrix is a special kind of square matrix where aij = a ji for all 𝑖 and 𝑗.

a h g a h g
   
f A = A
T
Let, A =  h b f  A =h
, T
b
g c  g c 
 f  f

So, 𝐴 is a symmetric matrix.


Skew-symmetric matrix:
A square matrix 𝐴 is said to be skew symmetric if AT = − A . That is, the transpose of a square
matrix is equal to the negative of that matrix.
 0 −6   0 6 0 −6 
Example: A =   , AT =   = −  = −A
 6 0   −6 0  6 0 

So, the matrix 𝐴 is a skew-symmetric matrix.

Matrix Algebra
Matrix addition and subtraction:
If 𝐴 and 𝐵 are matrices of the same size, then the sum 𝐴 + 𝐵 is the matrix obtained by adding the
entries of 𝐵 to the corresponding entries of A and the difference 𝐴 − 𝐵 is the matrix obtained by
subtracting the entries of 𝐵 from the corresponding entries of 𝐴. Matrices of different sizes cannot
be added or subtracted.

4
Matrices, Vectors and Fourier Analysis Summer 2023-2024

 4 8 1 2 
A= , B = ,
 9 3 1 3 
 5 10  3 6
A+ B =  , A− B =  .
10 6  8 0

Properties:
If the matrices 𝐴, 𝐵, 𝐶 are comfortable for addition and if 𝑘 is any scalar, then we can state that
1. 𝐴 + 𝐵 = 𝐵 + 𝐴 (commutative Law)
2. (𝐴 + 𝐵) + 𝐶 = 𝐴 + (𝐵 + 𝐶) (associative Law)
3. 𝐴 + 0 = 0 + 𝐴 = 𝐴 (where 0 is the zero matrix of the same order)
4. 𝑘(𝐴 + 𝐵) = 𝑘𝐴 + 𝑘𝐵 = (𝐴 + 𝐵)𝑘 (where 𝑘 is a scalar)

Scalar multiplication:
If 𝐴 is any matrix and 𝑐 is any scalar, then the product 𝑐𝐴 is the matrix obtained by multiplying
each entry of the matrix 𝐴 by 𝑐.
The matrix 𝑐𝐴 is said to be a scalar multiple of 𝐴.
 2 3 4 4 6 8
Example: A =   2A =  .
1 3 1  2 6 2

Matrix multiplication:
If 𝐴 is a 𝑚 × 𝑛 ordered matrix and 𝐵 is an 𝑛 × 𝑟 ordered matrix, then the product 𝐴𝐵 is the 𝑚 × 𝑟
matrix whose entries are determined as follows:
To find the entry in row 𝑖 and column 𝑗 of 𝐴𝐵, single out row 𝑖 from the matrix 𝐴 and column 𝑗
from the matrix B multiply the corresponding entries from the row and column together and then
add up the resulting products.
 4 1 4 3
1 2 4  
Let, A=  and B =  0 −1 3 1 
 2 3 0 23  2 7 5 2
 34
4 1 4 3
1 2 4 
 AB 24 =  2  0 −1
0  
3 1
 3
2 
2 7 5
 1.4 + 2.0 + 4.2 1.1 − 2.1 + 4.7 1.4 + 2.3 + 4.5 1.3 + 2.1 + 4.2 
= 
 2.4 + 3.0 + 0.2 2.1 − 3.1 + 0.7 2.4 + 3.3 + 0.5 2.3 + 3.1 + 0.2 
12 27 30 13 
= 
8 −1 17 9 

5
Matrices, Vectors and Fourier Analysis Summer 2023-2024

Multiplicative Properties:
If the matrices 𝐴, 𝐵, 𝐶 are comfortable for the addition and multiplication, we have the following
properties.
1. (𝐴𝐵)𝐶 = 𝐴(𝐵𝐶) (commutative law)
2. 𝐴(𝐵 + 𝐶) = 𝐴𝐵 + 𝐴𝐶 (distributivetive law)
3. (𝐴 + 𝐵)𝐶 = 𝐴𝐶 + 𝐵𝐶 (distributivetive law)
4. 𝑘(𝐴𝐵) = (𝑘𝐴)𝐵 = 𝐴(𝑘𝐵) (𝑤here 𝑘 is a scalar)

Theorem:
If 𝐴 and 𝐵 are matrices and AT and BT are the transpose of 𝐴 and 𝐵 respectively then,
1. (𝐴𝑇 )𝑇 = 𝐴
2. (𝐴 + 𝐵)𝑇 = 𝐴𝑇 + 𝐵 𝑇
3. (𝐴𝐵)𝑇 = 𝐵 𝑇 𝐴𝑇
4. (𝛼𝐴)𝑇 = 𝛼𝐴𝑇 , where 𝛼 is a scalar.

Exercise 1.1

−5 6 1 5 8 −4
1. If 𝐴 = ( ) and 𝐵 = ( ), then find the matrices 7𝐴, 3𝐴 + 2𝐵,
2 −2 9 1 2 −9
and 2𝐴 − 3𝐵.

−1 0 6 7 2 −7
2. If 𝐴 = ( 3 8 9) and 𝐵 = ( −1 −5 2 ), then find the matrices −2𝐴 + 4𝐵,
−3 4 6 4 0 1

and 5𝐴 − 3𝐵.

−1 4 7 0
3. If 𝐴 = ( ) and 𝐵 = ( ), compute 𝐴𝐵 and 𝐵𝐴.
0 3 −4 5

6 0 8 5
4. If 𝐴 = (−4 −2) and 𝐵 = (−2 −3), find 𝐴𝐵 and 𝐵𝐴 (if possible).
9 8 0 3
−1 4 7 0
), then prove that ( AB ) = B A .
T T T
5. If 𝐴 = ( ) and 𝐵 = (
0 3 6 5
2 −1 3 7 −2 8
6. If 𝐴 = (4 0 −1) and 𝐵 = ( 0 6 −2) then prove that (𝐴𝐵)𝑇 = 𝐵 𝑇 𝐴𝑇 .
0 5 2 −1 0 9

6
Matrices, Vectors and Fourier Analysis Summer 2023-2024

Determinant:

Determinant is a value associated with a square matrix. It can be computed from the entries of the
matrix by a specific arithmetic expression. The determinant of a matrix 𝐴 is denoted by det(𝐴),
det 𝐴, or |𝐴|. The value of an 𝑛 × 𝑛 determinant can be evaluated by using either any one of the
𝑛 rows or any one of the 𝑛 columns. The determinant of the matrix
𝑎 𝑏 𝑐 𝑎 𝑏 𝑐
𝐴 = (𝑑 𝑒 𝑓 ) is 𝐴 = (𝑑 𝑒 𝑓 )
𝑔 ℎ 𝑖 𝑔 ℎ 𝑖
and has the value 𝑎(𝑒𝑖 − 𝑓ℎ) − 𝑏(𝑑𝑖 − 𝑓𝑔) + 𝑐(𝑑ℎ − 𝑒𝑔).

2 9
Example: Evaluate | |.
−3 5
2 9
Solution: | | = 2(5) – (– 3)(9) = 37.
−3 5

1 1 −4
Example: Evaluate |2 −4 0 |.
0 2 1

1 1 −4
−4 0 2 0 2 −4
Solution: 2 − 4 0 = 1 –1 + (– 4) = 1(– 4) – 1 (2) – 4(4) =– 22
2 1 0 1 0 2
0 2 1
The given determinant was evaluated with the help of first row. One can evaluate the
determinant using any other row or column. In that case one must be careful about signs, i.e.
putting ‘ + ’ & ‘– ’ . Two other methods are shown below:
When column – 𝐈 is used:
1 1 −4
−4 0 1 −4 1 −4
2 −4 0 = 1 –2 +0 = 1(– 4) − 2(1 + 8) + 0 = – 22.
2 1 2 1 −4 0
0 2 1

When row – II is used:


1 1 −4
1 −4 1 −4 1 1
2 −4 0 =– 2 +(– 4) –0 = – 2(1 + 8) – 4(1 + 0) – 0 = – 22.
2 1 0 1 0 2
0 2 1
Now you should try to compute the same through other rows/columns. If you do not make any
mistake, you will get – 22 every time.

7
Matrices, Vectors and Fourier Analysis Summer 2023-2024

2 −2 0 3
1 0 1 −1
Example: Find the value of the determinant
2 1 −4 0
0 −1 2 1
Solution:
2 −2 0 3
0 1 −1 1 1 −1 1 0 −1 1 0 1
1 0 1 −1
= 2 1 − 4 0 – (– 2) 2 − 4 0 + 0 2 1 0 –3 2 1 −4
2 1 −4 0
−1 2 1 0 2 1 0 −1 1 0 −1 2
0 −1 2 1
= 2( 1) + 2 (– 10) + 0 – 3(– 4) = – 6.

Exercise 1.2
7 −3 0
1. Find the value of the determinant 3 4 3 .
−5 0 −5

2. Find the values of the constant 𝛼 so that the determinant of the following matrix becomes
zero

2 1 𝛼
𝐴 = (0 3 4 ).
1 −𝛼 1

3 −1 5
3. Find the value of the determinant −3 4 −3 .
5 −1 0

Matrix Inverse

Inverse of a matrix:

The inverse of a square matrix 𝐴 is denoted by 𝐴−1 such that AA −1 = A−1 A = I n ,


where 𝐼𝑛 is the identity matrix of order 𝑛.

8
Matrices, Vectors and Fourier Analysis Summer 2023-2024

Two commonly used methods for finding the inverse are:


i) Using adjoint matrix / cofactor method and
ii) Using elementary row operation.

Minor of an element of a matrix:

Deleting ith row and jth column, we get a new determinant of order (n-1) is called minor of 𝑎𝑖𝑗 is
represented by 𝑀𝑖𝑗 .

 a11 a12 a13 


 
Consider a matrix, A =  a21 a22 a23  . Minor of 𝑎11 is represented by 𝑀11 and is defined 𝑀11 =
a a33 
 31 a32
𝑎22 𝑎23
|𝑎 |.
32 𝑎33

Cofactor of an element of a matrix:


If we multiply the minor of the element in the 𝑖-th row and 𝑗-th column of the determinant of the
matrix by ( −1)
i+ j
, the product is called the cofactor of the element.
Cofactor of the element 𝑎𝑖𝑗 is represented by 𝐴𝑖𝑗 and is defined by
𝐴𝑖𝑗 = (−1)𝑖+𝑗 × 𝑀𝑖𝑗

 3 4 7
 
Example: If A =  −2 5 6  , find the cofactor of 𝑎23 = 6.
 7 3 −9 
 
Solution: The cofactor of 𝑎23 = 6 is
3 4
A23 = (−1) 2+3
7 3
= −(9 − 28)
= 19.
Adjoint of a square matrix:
Let A = [ aij ]n n be a square matrix of order 𝑛, then the adjoint of 𝐴 is defined to be the transpose
of matrix [ Aij ]n n , where Aij is cofactor of aij in 𝐴.

In other words, let

9
Matrices, Vectors and Fourier Analysis Summer 2023-2024

 a11 a12 . . . a1n 


 
 a21 a22 . . . a2 n 
 . . . . . . 
A= 
 . . . . . . 
 . . . . . . 

a . ann  nn
 n1 an 2 . .
T
 A11 A12 . . . A1n 
 
 A21 A22 . . . A2 n 
 . . . . . . 
Adj (𝐴) =   where Aij is the Co factor of aij .
 . . . . . . 
 . . . . . . 
 
 An1 An 2 . . . Ann 

1 1 1 
 
Example: Find the adjoint of the matrix A =  1 2 − 3  .
 2 −1 3 
 
T
 A11 A12 A13 
Solution: adj (𝐴) =  A21 A22 A23  where,
A 
 31 A32 A33 
2 −3 1 −3 1 2
A11 = (−1)1+1 = 3 , A12 = (−1)1+ 2 = −9 , A13 = (−1)1+ 3 = −5
−1 3 2 3 2 −1
1 1 1 1 1 1
A21 = (−1) 2 +1 = −4 , A22 = (−1) 2 + 2 = 1, A23 = (−1) 2 + 3 =3
−1 3 2 3 2 −1
1 1 1 1 1 1
A31 = (−1)3+1 = −5 , A32 = (−1)3+ 2 = 4, A33 = (−1)3+ 3 =1
2 −3 1 −3 1 2
𝑇
3 −9 −5 3 −4 −5
adj(𝐴) = −4 1 3 = −9 1 4 .
−5 4 1 −5 3 1
( ) ( )

Inverse of a matrix using co-factor:


−1 1
The inverse of a non-singular matrix 𝐴 is given by A = adj A (|𝐴| ≠ 0)
A

10
Matrices, Vectors and Fourier Analysis Summer 2023-2024

 1 0 − 4
 
Example: Compute the inverse of the matrix A =  − 2 2 5  and also verify your answer.
 3 −1 2 
 
adj(𝐴)
We know, 𝐴−1 = |𝐴|
here inv(𝐴) = 𝐴−1
1 0 −4
A = −2 2 5 = 1(4 + 5) − 0(−4 − 15) − 4(2 − 6) = 25
3 −1 2
T
 A11 A12 A13   A11 A21 A31 
   
adj A =  A21 A22 A23  =  A12 A22 A32 
A A33  A A33 
 31 A32  13 A23

2 5 2 5 −2 2
A11 = (−1)1+1 = 9, A12 = (−1)1+ 2 = 19 , A13 = (−1)1+ 3 = −4
−1 2 3 2 3 −1
0 −4 1 −4 1 0
A21 = (−1) 2 +1 = 4 , A22 = (−1) 2 + 2 = 14 , A23 = (−1)2 + 3 =1
−1 2 3 2 3 −1

0 −4 1 −4 1 0
A31 = (−1)3+1 =8, A32 = (−1)3+ 2 = 3 , A33 = (−1)3+ 3 =2
2 5 −2 5 −2 2
 9 4 8
 
 adjA =  19 14 3 
 − 4 1 2
 
adj A
 A−1 =
A
 9 4 8
1  
=  19 14 3
25 
− 4 1 2 
Verification: 𝐴𝐴−1 = 𝐼 = 𝐴−1 𝐴
−1
1 9 4 8 1 0 −4 1 25 0 0 1 0 0
𝐴 𝐴= ( 19 14 3) (−2 2 5 )= (0 25 0 ) = (0 1 0) = 𝐼
25 25
−4 1 2 3 −1 2 0 0 25 0 0 1

11
Matrices, Vectors and Fourier Analysis Summer 2023-2024

Example: Whether following matrices are invertible or not?


− 2 9   2 − 2 4
   
(𝑎)  0 1  and (𝑏)  3 2 1  .
 5 − 3  0 −1 1 
   
Solution:
(a). Definition of inverse is for square matrix only. It is a rectangular matrix. So, it has no
inverse.
(b). It is a square matrix. It may be singular or non-singular. To become sure, we calculate
the determinant of the matrix. We name the matrix ‘𝐴’.
2 −2 4
 |𝐴| = 3 2 1 = 0.
0 −1 1
So, the matrix ‘𝐴’ is singular & hence the inverse does not exist in this case.

 2 0 − 3
 
Example: Find inverse of 𝐵 =  0 9 2  and also verify the answer.
− 5 2 4 
 
2 0 −3
Now B = 0 9 2 = −71  0 .  𝐵 is non-singular, and 𝐵 −1 exists.
−5 2 4

 B11 B12 B13 


  𝑇
We know: The cofactor matrix, cof (𝐵 ) =  B21 B22 B23  & adj (𝐵 ) = [cof (𝐵)] .
B 
 31 B32 B33 
1+1 9 2 1+ 2 0 2 0 9
B11 =
( −1) B = ( −1) B13 = (−1)1+3
2 4 12
−5 4 −5 2
= 1 (36 – 4) = 32 = – 1 (0 + 10) = – 10 = 1 (0 + 45) = 45
2 +1 0 −3 2+ 2 2 −3 2 0
B21 = (−1) B22 = (−1) B23 = (−1) 2+3
2 4 −5 4 −5 2
= – 1 (0 + 6) = – 6 = 1 (8 – 15) = – 7 = – 1 (4 – 0) = – 4
0 − 3 2 −3 2 0
B31 = (−1) 3+1 B32 = (−1) 3+ 2 B33 = (−1) 3+3
9 2 0 2 0 9
= 1 (0 + 27) = 27 = – 1 (4 + 0 ) = – 4 = 1 (18– 0) = 18

 32 − 10 45   32 − 6 27 
   
Thus cof (𝐵 ) =  − 6 − 7 − 4  & adj (𝐵 ) =  − 10 − 7 − 4  .
 27 − 4 18   45 − 4 18 
   

12
Matrices, Vectors and Fourier Analysis Summer 2023-2024

 32 − 6 27   − 32 / 71 6 / 71 − 27 / 71
1    
 − 10 − 7 − 4  =  10 / 71 7 / 71 4 / 71  .
−1
 𝐵 =
− 71    
 45 − 4 18   − 45 / 71 4 / 71 − 18 / 71 
Verification: 𝐵𝐵 −1 = 𝐼 = 𝐵 −1 𝐵
1 32 −6 27 2 0 −3 1 −71 0 0 1 0 0
−1
𝐵 𝐵= (−10 −7 −4) ( 0 9 2 ) = ( 0 −71 0 ) = (0 1 0) = 𝐼
−71 −71
45 −4 18 −5 2 4 0 0 −71 0 0 1

Row Echelon Form (REF)

A matrix is in row echelon form (ref) when it satisfies the following conditions.
1. Nonzero rows (rows with at least one nonzero element) are above any rows of all zeros.
2. The leading coefficient (the first nonzero number from the left, also called the pivot) of a
nonzero row is always strictly to the right of the leading coefficient of the row above it.
Reduced Row Echelon Form (RREF) or Canonical form
A matrix is in reduced row echelon form (also called row canonical form) if it satisfies the
additional condition
3. The first non-zero element in each row, called the leading entry, is 1, that is, every leading co-
efficient is 1 and above and below all entries are zero in this column. Identity matrix is called
standard canonical matrix.
The following matrix is in row echelon form, but not in reduced row echelon form
1 9 1 1
(0 1 0 2).
0 0 1 3
However, the matrix below is not in row echelon form, as the leading coefficient of row 3 (that is
6) is not strictly to the right of the leading coefficient of row 2 (that is 4).
1 2 3 1
(0 4 7 2).
0 6 0 0
The matrix in reduced row-echelon form
1 0 0 0
(0 1 0 0).
0 0 1 0
0 0 0 0

Example: Find row echelon forms (REF) of the following matrix, and then convert it to reduced
row echelon form (RREF) or canonical form by using elementary row operations.

13
Matrices, Vectors and Fourier Analysis Summer 2023-2024

 2 −3 1 2
 
 4 −6 2 4 .
 − 4 6 −1 0 

Solution:
 2 −3 1 2  2 − 3 1 2 2 − 3 1 2
  𝑟̃2 ⟶ 𝑟2 − 2𝑟1   ~  
 4 −6 2 4
𝑟̃3 ⟶ 𝑟3 + 2𝑟1  0 0 0 0  𝑟 ⟶ 𝑟2 ↔ 𝑟3  0
2
0 1 4  ←REF.
 − 4 6 −1 0   0 0 1 4 0 0 0 0 
   
 2 − 3 1 2  2 − 3 0 − 2 1 − 3/ 2 0 − 1
  ~   ~ 𝑟1  
 0 0 1 4 𝑟1 ⟶ 𝑟1 − 𝑟2  0 0 1 4  𝑟1 ⟶ 2  0 0 1 4  ← RREF.
0 0 0 0 0 0 0 0   0 0 
    0 0

Example: Find row echelon forms (REF) of the following matrix, and then convert it to reduced
row echelon form (RREF) using elementary row operations.

− 2 1 1 
 
 0 8 − 4 .
 3 2 − 5
 
Solution:
− 2 1 1  − 2 1 1  − 2 1 1 
  ~   ~  
 0 8 − 4  𝑟3 ⟶ 3𝑟1 + 2𝑟3  0 8 − 4  𝑟3 ⟶ 8𝑟3 − 7𝑟2  0 8 − 4  ← REF.
 3 2 − 5  0 7 − 7  0 0 − 28 
    
− 2 1 1  − 2 1 1  − 2 1 0
  ~   𝑟̃1 ⟶ 𝑟1 − 𝑟3  
 0 8 − 4  𝑟3 ⟶ 𝑟3 /−28  0 8 − 4  𝑟̃ ⟶ 𝑟 + 4𝑟  0 8 0
3 
 0 0 − 28   0 0 1  2 0 1 
2
     0
 − 2 1 0  − 2 0 0 1 0 0
~  ~  ~  
𝑟2 ⟶ 𝑟2 /8  0 1 0  𝑟 ⟶ 𝑟1 − 𝑟2  0 1 0  𝑟 ⟶ 𝑟1 /−2  0 1 0  ← RREF.
 0 0 1 2  0 0 1 1 0 0 1
     

14
Matrices, Vectors and Fourier Analysis Summer 2023-2024

4 −1
Example: Find echelon forms of the following matrix(2 0 ).
5 2
4 −1 𝑟2 ⟶ 2𝑟2 − 𝑟1 4 −1 ~ 4 −1
Solution: (2 0 ) ~ (0 1 ) 𝑟 ⟶ 𝑟 − 13𝑟 (0 1 )← REF.
3 3 2
5 2 𝑟3 ⟶ 4𝑟3 − 5𝑟1 0 13 0 0

~ 4 0 ~ 1 0
(
𝑟1 ⟶ 𝑟1 + 𝑟2 0 1) 𝑟1 ⟶ 𝑟1 (0 1) ←RREF.
4
0 0 0 0

Inverse of a matrix using elementary row operations (also called the Gauss-Jordan
method).

1 3 3
Example: Find the inverse of 𝐴 = (1 4 3).
1 3 4
We start with the matrix 𝐴, and write it down with an identity matrix 𝐼 next to it
1 3 3 1 0 0
(1 4 3| 0 1 0)
1 3 4 0 0 1

(This is called the "augmented matrix")


Now reduce the matrix 𝐴 (the Matrix on the left) into an identity matrix. The goal is to make Matrix
𝐴 having 𝟏s on the diagonal and 𝟎s elsewhere (an identity matrix) and the right hand side comes
along for the ride, with every operation being done on it as well.
But we can only do these "elementary row operations":
• swap rows
• multiply or divide each element in a row by a constant
• replace a row by adding or subtracting a multiple of another row to it

And we must do it to the whole row, like this:

First, write down the entries of the matrix 𝐴, but write them in a double-wide matrix:

15
Matrices, Vectors and Fourier Analysis Summer 2023-2024

1 3 3
(1 4 3 | )
1 3 4

In the other half of the double-wide, write the identity matrix:

1 3 3 1 0 0
Augmented matrix, 𝐴| 𝐼 = (1 4 3| 0 1 0 )
1 3 4 0 0 1

Now do matrix row operations to convert the left-hand side of the double-wide into the identity.

1 3 3 1 0 0
(1 4 3 | 0 1 0 )
1 3 4 0 0 1

r̃2 → r2 − r1 1 3 3 1 0 0
⬚ (0 1 0 | −1 1 0 )
r̃3 → r3 − r1 0 0 1 −1 0 1

~ 1 3 0 4 0 −3
r1 → r1 − 3r3 (0 1 0 | −1 1 0 )
0 0 1 −1 0 1

~ 1 0 0 7 −3 −3
r1 → r1 − 3r2 (0 1 0 | −1 1 0 ) = 𝐼| 𝐴−1
0 0 1 −1 0 1

Now the left-hand side of the double-wide contains the identity, the right-hand side contains the
inverse. That is, the inverse matrix is the following:
7 −3 −3
𝐴−1 = (−1 1 0 ).
−1 0 1
1 2 3
Example: Find the inverse of 𝐴 = (2 5 3).
1 0 8
Solution:
Step 1: Adjoin the identity matrix to the right side of 𝐴:
1 2 3 1 0 0
(2 5 3| 0 1 0 )
1 0 8 0 0 1

Step 2: Apply row operations to this matrix until the left side is reduced to 𝐼. The computations
are:

16
Matrices, Vectors and Fourier Analysis Summer 2023-2024

1 2 3 1 0 0
(2 5 3| 0 1 0 )
1 0 8 0 0 1

𝑟̃2 → 𝑟2 − 2𝑟1 1 2 3 1 0 0
⬚ (0 1 −3| −2 1 0 )
𝑟̃3 → 𝑟3 − 𝑟1 0 −2 5 −1 0 1

~ 1 2 3 1 0 0
𝑟3 → 𝑟3 + 2𝑟 (
2 0 1 |
−3 −2 1 0 )
0 0 −1 −5 2 1

𝑟̃1 → 𝑟1 + 3𝑟3 1 2 0 −14 6 3


⬚ (0 1 0 | 13 −5 −3 )
𝑟̃2 → 𝑟2 − 3𝑟3 0 0 −1 −5 2 1

𝑟̃1 → 𝑟1 − 2𝑟2 1 0 0 −40 16 9


⬚ (0 1 0| 13 −5 −3 ).
𝑟̃3 → (−1)𝑟3 0 0 1 5 −2 −1

−40 16 9
−1
Step 3: Conclusion: the inverse matrix is: 𝐴 = ( 13 −5 −3 ).
5 −2 −1

Example: Find 𝐴–1 using elementary row operations where


1 −2 −4
𝐴 = (−2 0 −4).
1 −1 −1
1 −2 −4 1 0 0
Solution: (𝑨|𝑰) = (−2 0 −4 | 0 1 0)
1 −1 −1 0 0 1

𝑟̃2 → 𝑟2 + 2𝑟1 1 −2 −4 1 0 0
⬚ (0 −4 −12 | 2 1 0)
𝑟̃3 → 𝑟3 − 𝑟1 0 1 3 −1 0 1

~ 1 −2 −4 1 0 0
𝑟3 → 4𝑟3 + 𝑟2 ( 0 −4 −12 | 2 1 0)
0 0 0 −2 1 4

 𝐴 can’t be converted to 𝑰 by elementary row operation.


 𝐴–1 does not exist.

17
Matrices, Vectors and Fourier Analysis Summer 2023-2024

Exercise 1.3
1. Find the inverse of the following matrices (if possible) using cofactor method and
elementary row operations (ERO) method, also justify your answers.
 1 −1 1 
3 2   4 −2   
𝑎. A =  , 𝑏. A =  , c. 𝐴 =  2 −1 0  ,
 1 −4  7 6   1 −1 0 
 

1 0 2   −2 3 1   1 2 3
     
𝑑. B = 1 1 −3  , 𝑒. A =  4 5 8  , 𝑓. A =  2 5 3  ,
1 −1 1   9 −1 1   1 0 8
     

 −1 2 −3   2 1 −1 
   
2. If A =  2 1 0  and B =  0 2 1  , find 𝐴𝐵, 𝐵𝐴, 𝐴–1 𝐵, 𝐵 –1 𝐴 and (𝐴𝐵)−1 .
 4 −2 5   5 2 −3 
   

 −1 −8 −3  3
 
3. If A =  2 0 5  and 𝐵 = (−1), find A−1 B .
3 6 7 5
 

Rank of a matrix
After reduced the matrix to echelon form, the maximum number of independent (non-zero) rows
(or columns) in the matrix is called rank of the given matrix.
Procedure: Reduce the given matrix 𝐴 to row echelon form using elementary row operations
(transformations). The number of nonzero rows of the echelon matrix is the rank of the given
matrix.
Example: Reduce the matrix to echelon form and find the rank of the matrix
2 4 1 3
A=(−1 −2 1 0).
0 0 2 2
3 6 2 5
Solution: To determine the row-rank of 𝐴 we proceed as follows.

18
Matrices, Vectors and Fourier Analysis Summer 2023-2024

2 4 1 3 𝑟1 → 𝑟1 + 𝑟2 1 2 2 3 𝑟 →𝑟 +𝑟 1 2 2 3
2 2 1
A = (−1 −2 1 0) ~ (−1 −2 1 0) ~ (0 0 3 3 )
0 0 2 2 1
𝑟3 → 2 𝑟3 0 0 1 1 0 0 1 1
𝑟4 → 𝑟4 − 3𝑟1
3 6 2 5 3 6 2 5 0 0 −4 −4
𝑟 1 2 2 3 𝑟3 → 𝑟3 − 𝑟2 1 2 2 3
𝑟2 → 32
~ (0 0 1 1) ~ (0 0 1 1).
𝑟4 0 0 1 1 𝑟 →𝑟 −𝑟 0 0 0 0
𝑟4 → −4 4 4 2
0 0 1 1 0 0 0 0

So, the rank of the matrix 𝐴 is 2.


1 2 1
Example: Reduce the matrix to echelon form and find the rank of the matrix 𝐴 = (2 3 1)
1 1 2
Solution: To determine the row-rank of 𝐴, we proceed as follows.

1 2 1 𝑟2 → 𝑟2 − 2𝑟1 1 2 1 ~ 1 2 1
(2 3 1) ~ (0 −1 −1) 𝑟 → 𝑟 − 𝑟 (0 −1 −1)
3 3 2
1 1 2 𝑟3 → 𝑟3 − 𝑟1 0 −1 1 0 0 2

Here, there are 3 non-zero rows in row echelon form of 𝐴. So, the rank of the matrix 𝐴 is 3 .

1 0 0
Example: Find the rank of the matrix 𝐴 = (0 1 0).
0 0 1

Solution: The matrix 𝐴 is already in reduced row echelon form. By counting the number of non-
zero rows, we say its rank is 3.
−2 3
Example: Find the rank of the matrix 𝐴 = ( 0 4).
−2 7
Solution: Here we have
−2 3 ~ −2 3 ~ −2 3
( 0 4) 𝑟 → 𝑟 − 𝑟 ( 0 4) 𝑟 → 𝑟 − 𝑟 ( 0 4)
3 3 1 3 3 2
−2 7 0 4 0 0

The echelon form of ‘𝐴’ contains 2 pivots. Hence rank(𝐴) = 2.

19
Matrices, Vectors and Fourier Analysis Summer 2023-2024

Exercise 1.4
1. Reduce the following matrices to echelon form and hence, find the rank of the following
matrices:
 −1 2 0 4 5 − 3
 6 2 0 4 1 2 3 4   
     3 −7 2 0 1 4
M =  −2 −1 3 4  , B =  2 3 3 2  and P =  .
 −1 −1 6 10   5 9 12 14  2 − 5 2 4 6 1
     
 4 −9 2 −4 −4 7 
 
Ans: 2 Ans: 2 Ans: 2
2. Find the rank of the following matrices:
1 2 −1 1 −2 −1 1 −2 −1
i) 𝐴 = (−1 1 1 ), ii) 𝐴 = (−2 4 2 ). iii) 𝐴 = (−2 3 4 ).
0 3 0 −1 2 6 −1 2 6

Ans: 2 Ans: 2 Ans: 3


References:

❑ Linear Algebra and its applications by David C Lay, Pearson, 4th Edition.
❑ Linear Algebra and its applications by Lay and Lay, Pearson, 5th Edition

20

You might also like