0% found this document useful (0 votes)
36 views30 pages

Matrices 2025-1

The document outlines the key concepts and operations related to matrices in a business mathematics course. It covers definitions, types of matrices, matrix operations, and methods for solving systems of equations, including determinants and matrix multiplication. Additionally, it includes activities for practical application of the concepts discussed.
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)
36 views30 pages

Matrices 2025-1

The document outlines the key concepts and operations related to matrices in a business mathematics course. It covers definitions, types of matrices, matrix operations, and methods for solving systems of equations, including determinants and matrix multiplication. Additionally, it includes activities for practical application of the concepts discussed.
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/ 30

03-Feb-25

BMAT-1201
Business Mathematics II

Matrices

Outcomes

a) Define a matrix.
b) Represent matrices using standard notation.
c) Describe types of matrices: Row, column, null,
square matrix and its variations.
d) Carry out matrix operations: Scalar
multiplication, matrix addition and product.
e) Define a determinant of a matrix.
f) Calculate determinants: Cofactor, and Sarrus
methods
g) Describe the properties of determinants.
h) Determine the transpose, singularity, adjoint,
and the inverse of a matrix.
i) Solve system of equations: Cramer’s rule,
inverse method, Gaussian/Gauss Jordan method
j) Calculate the rank and nullity of a matrix

1
03-Feb-25

Matrix and Matrix Notation

 Defn:
 A matrix is a set of mn numbers arranged in a rectangular formation enclosed in [ ].
 A rectangular array of numbers (enclosed in [ ]).
 Each element/number in a matrix is called an entry.
 Denote matrices by capital bold letters: A, B, C, …
 Each entry is identified by its row and column as subscripts of the corresponding lower case
 E.g. if A is a matrix, then an entry in A in the i-th row and j-th column is denoted: aij
 NB:
 Matrix A can also be denoted as:
A   aij  or A  aij 

Order or Size of a Matrix


 The size of a matrix with m rows and n columns is denoted by × (i.e. number of rows first)
 Examples: In general, a matrix A of size, × :
 a11 a12 a13 ... a1n 
a b c a
B i.e. 2 × 3 ⇒ B23  21 a22 a23 ... a2 n 
d e f 
 . .
A   a ij    
 . .
 1 2 3 4 5  . .
 6 7 8 9  
 10  am1 am 2 am 3 ... amn 
A  11 12 13 14 15 i.e. 5 × 5 ⇒ A55
 
16 17 18 19 20
21 22 23 24 25

2
03-Feb-25

Types of Matrices
 Row & Column Matrices
 Dfn: Row Matrix E.g.: Row matrix A   5 6 0 12
 A matrix with one row
 Has order 1 ×  7
 Dfn: Column Matrix E.g.: Column matrix B   8
 A matrix with one column  3
 Has order ×1
 Null or Zero Matrix 0 0
E.g.: Null matrix O 
 Dfn: 0 0
 A matrix whose entries are all zeros (0s). NB: Generally, × is a null matrix iff =0∀ ,
 Denoted by letter O 1≤ ≤ and 1 ≤ ≤

Types of Matrices cont…


 Square Matrix E.g.:  4 0 1
 Dfn:
A   2 6 7 
 A matrix having the same number of rows and columns.
 11 5 3
 A square matrix of order × is written .
 Variations to Square Matrices: ⇒

 Dfn: Principal Diagonal


 The principal diagonal of a square matrix is the set of entries s.t. = extending from the upper
left corner to the lower right corner.
 ∴ Principal Diagonal = a11 , a22 , a33 , ... ann 
 The PD for matrix is {4, 6, 3}
 PD = Main Diagonal = Leading Diagonal

3
03-Feb-25

Types of Matrices cont…


 Diagonal Matrix
 Dfn
 A square matrix whose entries are all zeros except those in the principal diagonal.
 Note that some entries in the principal diagonal may be zeros.
 E.g.:
 7 0 0
0 0
A   0 11 0  B 
 0 0 10   0 8

 In general, a square matrix is a diagonal matrix iff:


0, i j
aij  
  0, At least one i  j

Types of Matrices cont…


 Scalar Matrix
 Dfn
 A square matrix whose all principal diagonal entries are the same, and all the other entries are zeros.
 E.g.:
 3 0 0
 0
A   0 3 0  B ,   0
 0  
 0 0 3
 In general, a square matrix is a scalar matrix iff:

0, i j
aij  
 k  0, i j

4
03-Feb-25

Types of Matrices cont…


 Identity Matrix (or Unit Matrix)
 Dfn
 A square matrix whose all principal diagonal entries are ones, and all the other entries are zeros.
 Denoted
 E.g.:
 1 0 0
 1 0
I 3   0 1 0  I2   
 0 0 1  0 1

 In general, a square matrix is an identity matrix iff:


0, i j
aij  
1, i j

Types of Matrices cont…


 NB:
 is a multiplicative identity while × (null matrix) is an additive identity
 Properties of Identity Matrix
 For × and × , + = + =
 For and , = = - As long as and are conformable for multiplication.
 Equality of Matrices E.g.:
 Matrices are equal iff:
 3 2  3 2
 Are of the same order/size.
A =  7 9  B =  7 9 
 Corresponding entries are equal.
 0 2   0 2 
 In general, if × = × , then aij  bij , i , j
A=B

5
03-Feb-25

Matrix Operation
 Scalar Multiplication
 If A is a matrix and a scalar (constant), then is a matrix whose entries are the entries of A, each
multiplied by .
 2 5  10 25
 A    aij  E.g.: 5A  5    15
 3 1  5
 Addition and Subtraction of Matrices
 If A and B are matrices of the same order, × , then their sum or difference is a matrix C whose
entries are obtained by adding or subtracting the corresponding entries.
A mn  B mn   aij  bij 

A mn  B mn   aij  bij 

Activity

 Use matrices of your choice to explore  Solve the following matrix equations:
whether or not matrix addition and i.
  1 0   2 6   4 8 
subtraction are commutative and/or X    1 5    2 0 
 0 2     
associative i.e.
AB BA &  A  B  C  A   B  C ii.
 Find the values of , , and that satisfy  1 0 2   2 3 1
the following matrix equation: 3X   2 1 3   1 2 0 
   
 a  3 2b  a   0 7   4 1 5  0 1 5
 c  1 4d  6    3 2d 
    iii.
 Write in tabular/rectangular form: 3 1
Y  2I 2   
= , where i = 1 and j = 1, 2, 3, 4  1 2

6
03-Feb-25

Example – Network Matrix


 The network below consists of 6 arrows and 4 nodes. One node is the reference node which has no
consequence on the network. The nodal incidence matrix of the network is = , where:
 1, if arrow j leaves node i

aij   0, if arrow j does not touch node i
1, if arrow j enters node i
  Solution:
Represent the nodal incidence matrix in a rectangular form.
Arrow
1 2 3 4 5 6
Node 1  1 11 1 0 0 0 
Node 2 0 1 0 1 1 0 
Node 3 0 0 1 0 1 1

Activity – Network Matrix

 Represent each of the following networks using nodal incidence matrix, = , where:
 1, if arrow j leaves node i

aij   0, if arrow j does not touch node i
 1, if arrow j enters node i

a) b)

7
03-Feb-25

Matrix Operation cont…


 Matrix Multiplication
 Let A and B be matrices, then they are conformable for multiplication if the number of columns of A is
equal to the number of rows of B i.e.

A  B  iff A is m  n and B is n  p
 The product of A and B will have number of rows equal to A’s rows and number of columns equal to
B’s.
A mn  B n p  C m p

 E.g.: A 23  B 38  C28

A55  B 45  C : What is the order of matrix C? Matrix C doesn’t exist

Procedure for Matrix Multiplication


 If AB = C, then each entry in the i-th row and j-th Multiplying A and B:
column of C is given by: Left to right Top to bottom

cij  ai1b1 j  ai 2 b2 j  ai 3b3 j  ...  ain bnj a a12   b11 b12 


AB   11  b 
n  a21 a22   21 b22 
cij   aik bkj
a b a b a11b12  a12 b22 
k 1
  11 11 12 21 
 E.g: Find AB given,
a21b11  a22 b21 a21b12  a22 b22 
a a12  b b12 
A   11 and B   11 a b a b a11b12  a12 b22 
 a21 a22  b21 b22  C   11 11 12 21
 Since A has 2 rows and B has 2 columns, they are  a21b11  a22 b21 a21b12  a22 b22 
conformable for multiplication.
Activity: Try B × A

8
03-Feb-25

Matrix Multiplication cont…

 NB: Example:
 Matrix multiplication is not commutative Compute the following products if they exist:
 If AB = BA, then A and B commute to each
 4 1  3 0 7 
other. a)  5 2   1 4 6 
 If A is a square matrix, then it can be multiplied
   
by itself
 8 5 3
2 3 n
 A , A , ... A   
 1 3 0 4   3 10 2 
 In the product AB, b)  2 5 8 9   2
  0 4 
 A is a pre-multiple of B.  
 B is a pre-multiple of A.  1 7 5

Solution

 a)
 4 1  3 0 7   4  3  1  1 4  0  1 4 4  7  1 6
 5 2   1 4 6   
     5  3  2  1 5  0  2  4 5  7  2  6 
2×2 2×3
 11 4 34 
 
 17 8 23 
(The product will be a 2 × 3 matrix)
Alternatively, multiply 1st matrix and each column of the 2nd matrix separately.

 4 1  3  11 11  4 1  0  141  4 1  7   3344



 5 2   1 17   5 2   4  17  
 5 2   6  23 
          8      23
Put these columns in one matrix

9
03-Feb-25

Solution cont…

 b)  8 5 3
   13 53 17 
 1 3 0 4   3 10 2 

 2 5 8 9   2
  0 4  81
 56 23 81
 
 1 7 5
2×4 4×3

(The product will be a 2 × 3 matrix)


1  8  (3)  3  0  2  4  1  1313 2  8  5  3  8  2  9  1  5566
1  5  (3)  10  0  0  4  7  53
53 2  5  5  10  (8)  0  9  7  223
3
1  3  (3)  2  0  4  4  5  117
7 2  3  5  2  (8)  4  9  5  8181

Matrix Multiplication cont…

 NB: Example:

 ( A)B = (AB) = A( B), ∈ℝ  The matrix below shows the production level at a

 (A + B)C = AC + BC – Distributive property factory in Kanengo.

 C(A + B) = CA + CB – Distributive property Product


A B C
 If A is of order × , B of order × , and C
 23 16 10  Units of material
of order × , then (AB)C = A(BC) –  7 9 11 Units of man-hours
 
Associativity of matrix multiplication
If the cost (‘000) of each unit of material is K45 and
man-hour is K6, use matrix operation to determine
the cost of producing products A, B and C.

10
03-Feb-25

Solution
 Production matrix:
A B C
 23 16 10  Units of material
P 
 7 9 11 Units of man-hours
Cost matrix:
C  Mat Lab
C   45 6 
Total cost = CP
 23 16 10 
 45 6 
7 9 11   1, 077 774
774 516
 
The cost of production for A was K1,077,000, B was K774,000 & C was K516,000

Activity
 1. Write the following as a single matrix:  100 450 175 Airtel

B   250 120 200  NBS
 2 2 1  1 2 5  340 230 120  TNM
 1 1 2   1 1 3 Takondwa Tawonga Talandira
   
 1 0 1  1 2 4  a) Use matrix algebra to find how much
 2. The price per share at the close of trading on Takondwa, Tawonga and Talandira each
January 17, 2025 for stock in Airtel, NBS and TNM spent on shares?
was: Airtel – K85, NBS – K312 & TNM – K21 b) Let C be a 3 × 1 matrix whose entries are
Let B be a matrix showing the number of shares of all 1s. Find the matrix BC and give an

stock purchased at the close of trading on January 17, interpretation of the entries in this product.
2025 by Takondwa, Tawonga, and Talandira. a) K93,640; K80,520; K79,795

11
03-Feb-25

Determinants
 Dfn:  a) det(A):
 It is a function of the entries of a square matrix 6 5
whose outcome is a scalar quantity.
A   6  1  3  5  9
3 1
 A determinant is denoted det(A ) or det A or | |.
 Determinant of a 2 × 2 matrix:  b) det(B):

a b  a b 7 8
A2   , det( A)   ad  cb B 
c d  c d 1 2
 
 E.g.: Find the determinant, given  7   2    1   8 
 6 5  7 8  22
a) A  b) B 
 3 1  1 2 

Determinants cont…
 Determinant of a 3 × 3 matrix:  Since e is in the 2nd row and 2nd column, its
 Recall that for a 3 × 3 matrix, = . minor is the determinant of the matrix formed

 Dfn: Minor by deleting the 2nd row and 2nd column i.e

 The minor, of the entry is the determinant a c


M e  M 22 
of the matrix obtained by deleting the i-th row and x z
j-th column.  az  xc
Activity:
a b c Write the minors of the following entries: f, x,
 E.g.: For A   d e f  and z.
 x y z  = − ; = − ; = −
Determine the minor of the entry e.

12
03-Feb-25

Determinants cont…

Activity  Dfn: Cofactor


 Consider the matrix below:  The cofactor, , of the entry is (−1)
11 2 4   Cofactor signs for a 3 × 3 matrix:
9 3 2     
  
 
 5 8 6   
    
Determine the following:
a)  NB: When + is even, the sign is + and when + is

b) odd, the sign is – .


 M ij , i  j is even
c)  Therefore, a cofactor the entry 
 M ij , i  j is odd
= 34; = 98; = 14

Determinants cont…
 Dfn: Determinant of a 3 × 3 matrix Solution:
 det( ) = the sum of the products Choose a row or column: - Row 2
of the entries of any row (or Find the sum of the products of the entries of Row 2 and
column) and their corresponding their cofactors:
cofactors. 3 2 1
Example det( A)  4 1 2
Find det(A), 1 3 4
3 2 1 2 1 3 1 3 2
 ()4 1  ()(2)
A   4 1 2  3 4 1 4 1 3
 1 3 4   4  5   111  2  7   5

13
03-Feb-25

Determinants cont…
Activity  Evaluate | | given that
 Consider the matrix below:
 8 4 3
3 2 1
B    5 6  2 
A   4 1 2   7 9  8 
 1 3 4 
Find det(A) by cofactor expansion using the |B| = – 717
a) 1st row
b) 3rd row
c) 1st column det(A) = 5
d) 2nd column
e) 3rd column

Determinants cont…

 Sarrus Rule (Diagonal Rule)  Add the products of the three diagonal entries
Consider the matrix running from top-left to bottom-right
 a b c  Add the products of the three diagonals entries
A   d e f  running from bottom-left to top-right.
 g h i   det(A) = the difference between top-bottom sum and
 To find the determinant of A, the bottom-top sum i.e.
 Write the first two columns of the  a b c a b
 
matrix to the right of the third column d e f d e
 a b c a b  g h i g h 
 
d e f d e det( A )  ( aei  bfg  cdh )  ( gec  hfa  idb )
 g h i g h  Activity: Find |B| using Sarrus Rule.

14
03-Feb-25

Properties of Determinants
 If two rows or columns are identical, then the value of  The determinant of a diagonal matrix is the
the determinant is zero (0). product of its diagonal entries.
a b c  Eg.g: Find det(A)

 E.g.: A  a b c 0  3 0 0
x y z A   0 5 0 
 If every entry of a row or column is multiplied by λ,  0 0 2 
then the determinant is also multiplied by λ . |A| = 3 × 5 × −2 = −30
 E.g.: Find the determinants of A and B  The determinant of a product of two
 6 5 12 5 matrices = the product of the determinants of
a) A  b) B 
 3 1  6 1 the matrices i.e.
|A| = – 9 |B| = 2|A| = – 18 det(AB) = det(A) x det(B)

Application of Determinants – Cramer’s Rule


 Cramer’s rule is used to solve a systems of equations.  Find the determinant of the coefficient
 Steps: matrix and represent it as D i.e det(A) = D
 Write a system of equations in matrix form:  Find the determinants of the matrices
AX  B obtained by replacing the i-th column of
Where: A = Coefficient matrix – Square matrix the coefficient matrix by the solution
X = Variable matrix – Column matrix matrix. Represent the determinants as
B = Solution matrix – Column matrix  Find the value of the variable by
E.g.: dividing by D i.e.
 6 5  x1  10 
Dxi
 3 1  x    7  xi  , D0
  2   D
A X B

15
03-Feb-25

Types of Solutions - Cramer’s Rule


Check the value of the
determinant of A, D

≠0 =0
Unique solution (Consistent system)
Dx Dx Dx Check the values of
x1  1 , x2  2 , x3  3 ...
D D D

At least one of the No numerator determinant


numerator determinants is 0 is 0 i.e. ≠0
Infinitely many solutions No solution (Inconsistent system)

Example
 Solve the following systems of 2 5
det( A)  D    2  3    8  5   46
equations using Cramer’s rule: 8 3
a) 2 x  5 y  23
23 5
8 x  3 y  23 det( A x )  Dx    23  3    23  5   184
23 3
b) x1  x2  x3  2
2 23
2 x1  x2  3 x3  9 det( A y )  Dy    2  23    8  23  138
8 23
x1  3 x2  x3  10
Dx 184 Dy 138
x   4 y  3
Solution D 46 D 46
 a) AX = B:  2 5  x   23 x  4, y  3
 8 3  y    23
    

16
03-Feb-25

Example cont…
 b) AX = B:  2 1  9    9  30    27  10   4
 1 1 1  x1   2  1 2 1
2 1 3  x2    9 det( A x2 )  Dx2  2 9 3

 1 3 1  x3  10 1 10 1

1 1 1   9  30   2  2  3   20  9   8
det( A)  D  2 1 3 1 1 2
1 3 1 det( A x3 )  Dx3  2 1 9
1 3 10
 1   9     2  3   6  1  4
 10  27    20  9   2  6  1  12
2 1 1 Dx1 Dx
4 8 Dx 12
det( A x1 )  Dx1  9 1 3  x1   1 x2  2   2 x3  3  3
D 4 D 4 D 4
10 3 1 x1  1, x2  2, x3  3

Example
 Linga farmers have 500 acres of land for growing AX = B:
maize and soya. The costs (K’000) of growing  1 1  x   500 
 42 30   y   18,600 
maize and soya are K42 and K30 per acre,     
respectively. The farmers have K18,600 available 1 1
det( A)  D   12
for growing the crops. If they wish to use all the 42 30
land and the entire budget for the two crops, how
500 1
many acres of each crop should they grow? det( A x )  Dx   3,600
18, 600 30
Solution:
1 500
Let the farm use x acres for maize and y acres for soya det( A y )  Dy   2, 400
42 18, 600
Equations: x  y  500
42 x  30 y  18,600

17
03-Feb-25

Example cont…

Dx 3, 600 4 x1  2 x2  9 x3  2
x    300
D 12
3 x1  4 x2  x3  5
Dy 2, 400
y   200 x1  3x2  2 x3  8 7, -3 & -4
D 12
b) Determine whether the following system is
Linga farmers should grow maize on 300 acres
consistent or inconsistent. If consistent, whether has
and soya on 200 acres of the land.
a unique or infinitely many solutions.
x  2 y  3z  17
Activity: 2x  y  2z  6
Use the Cramer’s rule to:
2 x  4 y  6 z  34
a) Solve the following system of equations
Consistent with infinitely many solutions

Activity cont…
 Yankho has a total of K2,000,000 on deposit with two village banks. One pays interest at the rate of 3%
per year, whereas the other pays interest at the rate of 4% year. If Yankho earned a total of K72,000 in
interest during last year, how much did she have on deposit in each bank?
K800,000 & K1,200,000
 Malawi Housing Corporation (MHC) is planning build a new apartment complex consisting of one-
bedroom, two-bedroom and three-bedroom units. A total of 192 units is planned, and the number of
family units (two-bedroom and three-bedroom) will be equal to the number of one-bedroom units. If the
number of one-bedroom units will be 3 times the number of three-bedroom units, find how many units
of each type will be in the complex.
1-bedroom – 96, 2-bedroom – 64 & 3-bedroom – 32

18
03-Feb-25

Special Matrices
 Transpose of a Matrix  If =– , then is skew symmetric
 Dfn:
 If A is a matrix, then the transpose of A is a matrix  0 4 1
obtained by interchanging the rows and columns.  E.g.: B   4 0 3
 Denoted or or  1 3 0 
 1 2  1 4
 E.g.: B  BT     0 4 1
 4 5   2 5 
B   4 0 3
T

 If = , then is symmetric
 1 3 0 
 8 1 2   8 1 2 
 E.g.: A 
 1 3 5 A   1 3 5
T B   BT   B  BT
 
 2 5 7   2 5 7 

Special Matrices cont…


 Singular & Non-Singular Matrices
Example
 Dfn:
 Evaluate x if A is singular.
 A square matrix, , is called singular if |A| = 0
i.e. det(A) = 0.
 3 x
A 
 If det(A) ≠ 0, then A is non-singular 8  x 4 
Solution
 3 12 
 E.g., if B     Since A is singular, then det(A) = 0
 2 8
12   8  x  x  0
det(B)   3  8    9  2   0
12  8 x  x 2  0
∴ B is a singular matrix  x  6  x  2   0
 x  2 or 6

19
03-Feb-25

Special Matrices cont…


 Adjoint of a Matrix
Example  1 0 1
 Dfn: 
 Find adj(A) if A  1 3
 1
 An adjoint of a square matrix, is the transpose
0 1 2 
of a matrix obtained by replacing the entries of the
Solution
matrix by its corresponding cofactors.
Cofactors, :
 The transpose of the cofactor matrix, . Cofactor of a11 , C11  3  2  1  1  5
 Denoted ( ) Cofactor of a12 , C12   1  2  0  1  2
T
Cofactor of a13 , C13  1  1  0  3  1
adj  A    Cij  C21  1, C22  2, C23  1
C31  3, C32  2, C33  3
where is the cofactor matrix of A

Special Matrices cont…


The cofactors:  5 1 3
adj  A    2 2 2 
C11  5, C12  2, C13  1
C21  1, C22  2, C23  1
 1 1 3
C31  3, C32  2, C33  3
 NB:
The cofactor matrix:
 For 2 × 2 matrix, the adjoint is:
 5 2 1
 a a12 
C   1 2 1
Swap &
adj  A    22
 a21 a11  Negate &
 3 2 3
a b   d b
 5 2 1
T
 E.g.: A    adj  A   
 c a
c d 
adj(A) =   1 2 1
 
 3 2 3

20
03-Feb-25

Special Matrices cont…


 Inverse of a Matrix Example
 Dfn:  Find , given:
 If A is a non-singular square matrix, then the 3 4 
A 
inverse of A is another square matrix B such  1 2
that AB = BA = I
Solution:
 Denoted 3 4
det  A   64  2
 The inverse of is given by 1 2
 2 4 
1 adj  A  adj  A    
A 1  adj  A    1 3
det  A  det  A 
1
 A 1  adj  A 
det(A )

Special Matrices cont…

1  2 4 
A 1 
2  1 3

 1 2 
  1 3 
 
2 2
Activity:
 Find if it ∃, given that

 0  2  3  0  2  3
B   1 3 3 B 1
  1 3 3
 
 1 2 2   1 2 2 

21
03-Feb-25

Solving Systems of Linear Equations – Inverse Method

 Steps:
A 1 AX  A 1B
 Write the system of equations in matrix
IX  A 1B
form:
AX = B
X  A 1 B (Solution to the system)

 If B = O, then the system is adj ( A)


X B
homogenous. det( A)
 NB:
 If B ≠ O, then the system is non-
 If A is singular (i.e. ∄), then either the system
homogenous
has no solution or the solution is not unique.
 If A is non-singular (i.e. ∃), and
the system is non-homogenous,
multiply both sides of AX = B by A

Example
 Solve the following system of equations X= B:
using the inverse of a matrix method: 1 1 2
det( A)  3 1 1
x  y  2z  3
3 3 6
3x  y  z  5
3x  3 y  6 z  9 1 1 2 1 1
 
Solution 3 1 1 3  1
 3 3 6 3 3 
 Matrix form AX = B:

 1 1 2   x   3 det( A)   6  3  18    6  3  18   0
3 1 1  y   5  Since det(A) = 0, A is a singular matrix. ∴ ∄. The
    
3 3 6   z  9  system has no solution or has many solutions.

22
03-Feb-25

Example
 Solve the following system of equations 3 1
det( A)   15  4  19
using the inverse of a matrix method: 4 5
1
X  A 1B =  adj ( A )  B
3 x1  x2  4 det  A 
4 x1  5 x2  18  x1  1  5 1  4 
 x   19  4 3 18
Solution  2   

 Matrix form AX = B: 1  38


  
19  38
3 1  x1   4
 4 5  x   18  x1   2 
  2  
x    
 2  2 
X= B:
∴ =2& = −2

Example
 Solve the following system of equations 1 3 2
using the inverse of a matrix method: det( A)  2 3 0

x1  3 x2  2 x3  3 1 1 4
2 x1  3 x2  1  1 3 2 1 3
 
x1  x2  4 x3  2 2 3 0 2 3
Solution  1 1 4 1 1 

 Matrix form AX = B: det( A)  12  0  4    6  0  24   22


 1 3 2  x1   3  Since det(A) ≠ 0, A is a non-singular matrix, and the
 2 3 0  x    1
  2   system is non-homogenous, we use:
 1 1 4  x3   2 1
X  A 1 B =  adj ( A )  B
det  A 

23
03-Feb-25

Example cont…

 x1   3  12 14 6 
x   1  1 T  
T
adj  A    Cij    8 2 4 
 2  22  Cij   
 x3   2   5 4 3

Cofactor matrix of A, ( ):  x1   12 14 6  3


x   1  8 2 4  1
 1 3 2 C11  12, C12  8, C13  5  2  22    
 5 4 3  2   55 
A   2 3 0 C21  14, C22  2, C23  4
 x3 
 11 11 
 1 1 4 C31  6, C32  4, C33  3  x1   
 x1  1010   x    77 
x   1    2   1111 
 12 8 5   2  22  14   x3  
1717 
Cij    14 2 4   x3   17 
 22
22 
 6 4 3 ∴ = , = , =

Activity

 Solve the following systems of equations using the inverse methods:

2 x  3 y  1 x y  2 4 x  8 y  z  6
x  4y  5 2x  z  1 2x  3y  2z  0
2 y  3z  1 x  7 y  3z  8

x = 1, y = 1 x = 1, y = 1, y = 1 x = -2, y = 0, y = 2

24
03-Feb-25

Special Matrices cont…


 [Row] Echelon Matrix Example
 A matrix is in [row] echelon form iff:  State whether or not each of the
1. A leading (left-most) entry of every non-zero row is to following is in echelon form.
the right of the leading entry of every row above it.  1 0 0
0 3 0
2. All entries below a leading entry are zeros.   0 1 0 0
 0 0 1  1 0 0 0
3. All rows consisting of zeros are at the bottom.    
 Reduced Row Echelon Form [Row] Echelon Not echelon Reduced row
echelon
 In addition to the three above, in a reduced row echelon
 1 0 5  1 0 0 0
form: 0 1 0 0 0 1 0
   
4. All leading entries are 1s – Leading 1s Reduced [row] echelon
 0 0 0 
5. All entries above and below a leading 1 are zeros. Reduced [row] echelon

Gaussian Elimination & Gauss Jordan Methods


 Steps – Solving a system of linear equations:  For Gauss Jordan, perform row operations
 Write the systems as augmented matrix – Append (iterations) until the augmented matrix is
(combining) the coefficient matrix, A and the transforms into a reduced row echelon
solution matrix, B. form.
A B
 Once in reduced echelon form, the
2 3 12 
  variables corresponding to the pivots
 1 5 7 
(leading 1) are called “basic variables”.
 For Gaussina Elimination, perform row
 Read the values of the basic variables
operations (iterations) until the augmented matrix
straight from the reduced echelon matrix.
is transforms into a row echelon form.
 Apply back substitution to evaluate the variables.

25
03-Feb-25

Gaussian Elimination & Gauss Jordan cont…

 The three basic elementary row operations: Example:


 Multiply row i by a constant c Solve the following system of linear equations:
Notation: Ri  cRi 4 x  8 y  z  6
 Interchange rows i and j 2x  3y  2z  0
Notation: Ri  R j x  7 y  3z  8
 Add c times row i to row j
Solution:
Notation: R j  R j  cRi
Augmented matrix
4 8 1 6 
 
 2 3 2 0
 1 7 3 8

Example cont…

Gaussian elimination – Need row echelon 1 7 3 8 


 
Need a 1 4 8 1 6   0 17 8 16 
Need a
here    00 20 13 26 
2 3 2 0 1 here
 1 7 3 8 R2  R2  17

R1  R3
1 7 3 8 
 
Need 0 0 1 8 / 17 1
166 / 17
17 
 1 7 3 8  here
Need 0s    0 20 13 26 
here  2 3 2 0
R3  R3  20 R2
 4 8 1 6 
1 7 3 8 
 
 0 1 8 / 17 16 / 17  Row Echelon
R2  R2  2 R1 R3  R3  4 R1
 0 0 61 / 17 17 
122 / 17

26
03-Feb-25

Example cont…

1 7 3 8  Back substitution
  Eq...(3) : z2
 0 1 8 / 17 16 / 17 
8 16
 0 0 61 / 17 122 / 17  Eq...(2) : y z 
17 17
Need a 1 16 8
 y     2  0
here 17 17
61 Eq...(1) : x  7 y  3 z  8
R3  R3 
17
 x  8  7  0   3  2   2
x y z
1 7 3 8  x  2, y  0, z  2
 
 0 1 8 / 17 16 / 17 
 0 0 11 2 

Example cont…
Using Gauss Jordan – Reduced row echelon x y z Basic variables
1 0 0 2 
1 7 3 8    Reduced row echelon
Need a   0 1 0 0
0 here 0 1 8 / 17 16 / 17 
 0 0 1 2 
0 0 1 2 
x  2, y  0, z  2
R1  R1  7 R2 Need 0s Activity:
here  After attempting to solve a system of linear
 1 0 5 / 17 equations, a student ended up with the following

224 17 
4 // 17
  reduced echelon matrix. Determine the solution.
 0 1 8 / 17 16 / 17 
 0 0 1 0 1 3
1 2    Many solutions
0 1 2 4
5 8
R1  R1  R3 R2  R2  R3 0 0 0 0
17 17

27
03-Feb-25

Activity
 Solve the following systems of equations using c)
either Gaussian elimination or Gauss Jordan x1  x2  6 x3  x4  4
method: Many solutions
x1  9 x3  x4  6
a) 3 x  2 x  8
1 2
= 2, = −1 2 x2  6 x3  x4  9
2 x1  5 x2  1
b)
b)
2x  6 y  7 z  7 2 x1  6 x2  15 x3  12
6 x  18 y  24 z  6 4 x1  7 x2  13x3  10
No solution 3x1  6 x2  12 x3  9
2 x  y  5 z  14
2 x  12 y  4 z  10 = −3, = 4, = −2,

Rank and Nullity of a Matrix


 Dfn: Rank 1
R2  3R1 ; R1  R2
 Rank of a matrix is the [maximum] number of 3
∴ Max # of linearly independent rows = 1
linearly independent rows or columns in the
Columns:
matrix.
 Likewise, each column can be expressed as
 Rank of a matrix is denoted r(A).
a linear combination of the other.
 E.g.:
 1 2 4 ∴ Max # of linearly independent columns = 1
A  r(A) = 1
3 6 12 
 Alternatively, transform a matrix into an
Rows:
echelon form. The rank will be the number of
 Each row can be expressed as a linear combination
non-zero rows.
of the other

28
03-Feb-25

Rank and Nullity cont…


 Same example (Using [reduced] row echelon form): Activity:
 Find the rank and nullity of B.
 1 2 4
A   1 1 0 2 
3 6 12  B   2 0 2 2 
R2  R2  3R1
 4 1 3 1 r(B) = 2,
 1 2 4 Nullity = 4 – 2 = 2
0 0 0
   1 3
∴ r(A) = 1 (# of non-zero rows)  0 2 
 Dfn: Nullity B  r(B) = 2,
 Nullity is the difference between number of rows
 5 1
Nullity = 2 – 2 = 0
 
and the rank of a matrix i.e. n(Columns) – r(A).   2 3 

Why Study Rank of a Matrix – Data Science


 Rank is used to calculate compression of data. Write all columns as linear combinations of
the independent columns:
 E.g.: Consider matrix A below
= +0
C1 C2 C3 C4 C5
1 1 2 4 2 =0 +
2 1 3 5 4 = +
A = +3
1 1 2 4 2
  =2 +0
0 1 1 3 0
Then, the matrix can be compressed as:
Linear combinations of
 1 0 1 1 2
= + C1 C2 C3 C4 C5   C1 C2   
0 1 1 3 0
= +3  r A  2

=2

29
03-Feb-25

30

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy