0% found this document useful (0 votes)
4 views50 pages

New Matrix

Uploaded by

barakaely34
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)
4 views50 pages

New Matrix

Uploaded by

barakaely34
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/ 50

Matrices

• A matrix is an array of numbers enclosed by


brackets.

Assignment: Describe different types of


matrices.
Determinant of Matrix
a b
Consider the 2x2 matrix A =  .
c d 

The elements a and d are leading diagonal while
b and c are main diagonal.
a b
The determinant of matrix A = c d = ad - cb

Determinant of Matrix A is denoted by det A or


A
a22 a23 a21 a23 a21 a22
| A | a11   a12   a13 
a32 a33 a31 a33 a31 a32
| A | (a11a22a33  a11a23a32 )  (a12a21a33  a12a23a31 )  (a13a21a32  a13a22a31 )
Example
2  3 1 
• Find the determinant for matrix 2 0  1
 
1 4 5 
Solution
2  3 1  2 3 1
Det 2 0 1 = 2 0  1  2 0  1  (3) 2 1
1
2 0
1 4 5  4 5 1 5 1 4
1 4 5
 2(0  4)  3(10  1)  (8  0)  8  33  8  49
2  3 1 
2 0  1
Determinant of matrix   =49.
1 4 5 
Try:
 5 0  1
Find det  1 2 1
 
 3 4 1 
Cramer’s rule

This is a method that can be used to solve


systems of linear equations using
determinants.
Cramer’s rule
• Given a system of 2x2 linear equations:
w where;
• To solve the given system • We need to break the
system above into various
matrices as follows;
 a1 b1 
D  ,
a2 b2 
 c1 b1 
X  matrix  Dx    ,
c2 b2 
 a1 c1 
Y  matrix  D y  
 a2 c2 
• To solve for the variable x:
c1 b1
| Dx | c2 b2
x 
|D| a1 b1
a2 b2
To solve for the variable y:
a1 c1
| Dy | a2 c2
y 
|D| a1 b1
a2 b2
Example
Solve the system with two variables by
Cramer’s Rule
• Once all three determinants are calculated, it’s
time to solve for the values of x and y using
the formula above
• Therefore ;

• Hence (x, y)=(2,-1)


Example
Solve the following system of linear equation using
crammers Rule
2𝑥 + 4𝑦 = 16

𝑥 − 2𝑦 = −4
• In matrix form is written as
2 4 𝑥 16
𝑦 =
1 −2 −4
𝐴𝑥 𝐴𝑦
X= Y=
𝐴 𝐴
• Where
2 4 16 4 2 16
𝐴= 𝐴𝑥 = 𝐴𝑦 =
1 −2 −4 −2 1 −4
• Therefore the solution is x = 2 and y = 3
Cramer’s Rules for Systems of Linear Equations
with Three Variables

• Given a linear system

• We can extract four matrices which we will


use to solve for variables x, y and z
Example 1: Solve the system with three
variables by Cramer’s Rule.

We first need to formulate the four coefficient


matrices;
Try:
Solve the system with three variables by
Cramer’s Rule
Minor
• The minor of an element is an 𝑛𝑡ℎ order
determinant if the (𝑛 − 1)𝑡ℎ order
determinant obtained by removing the row
and column which contain the element.
• For 3X3 matrix
𝑎11 𝑎12 𝑎13
𝐴 = 𝑎21 𝑎22 𝑎23
𝑎31 𝑎32 𝑎33
• The minor of any element of matrix A is the
determinant of 2X2 matrix
• Minors of the elements of the first row
a22 a23
A11 
a32 a33
a21 a23
A12 
a31 a33
a21 a22
A13 
a31 a32
COFACTORS
• A cofactor Cij is a number obtained when
minor is multiplied by (-1)i+j . Where i and j
represent the row and column of the
particular element whose cofactor is being
determined. Cofactor of an Element is given
by
i j
Cij  (1)  Minor of an Element
1
Example 1: Find the cofactors for:  2 2

3 2 3
And hence give the cofactor matrix.  4 5 6

2 3
11 1 2 3 3 1 3 3 2
C11  (1)  3, C12  (1)  6, C13  (1) 7
5 6 4 6 4 5
1 2
2 1 2 2 2 2 23 2  1
C21  (1)  16, C22  (1)  4, C23  (1)  14
5 6 4 6 4 5
1 2
31 3 2 2 2 3 3 2  1
C31  (1)  7, C32  (1)  0, C33  (1) 7
2 3 3 3 3 2
 3 6 7 
 
Cofactor matrix (C)   16 4  14
  7 0 7 
 1 2 3
 
Cofactor matrix (C)   1  4  7
 1 2 5 
Inverse of matrix

n n
• The inverse of A is given by
−1 1
𝐴 = Adj A
𝐴

Example:Find the inverse of the matrix


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

Solution: we find the cofactors of A


11 2 3 1 2 3 3
C11  ( 1)  3, C12  ( 1)  6,
5 6 4 6
1 3 3 2 2 1  1 2
C13  ( 1)  7, C21  ( 1)  16,
4 5 5 6
2 2 2 2 23 2 1
C22  ( 1)  4, C23  ( 1)  14,
4 6 4 5
31 1 2 3 2 2 2
C31  ( 1)  7, C32  ( 1)  0,
2 3 3 3
3 3 2 1
C33  ( 1) 7
3 2
 3 6 7 
Cofactor matrix (C)  
 16 4  14


 7 0 7 
Adj( A)  [cofactormatrix]T  C T
 3 16  7
Adj ( A)  
 6 4 0 


 7  14 7 

 3 16  7
1 
0 
Adj ( A)
A1    6 4
| A| 14
 7  14 7 

• Note : we can only find the inverse of a matrix if


the determinant is not equal to zero.
Solving system of linear equations by
Inverse Method
• A system of two linear equations in two
unknowns which is in form
𝑎𝑥 + 𝑏𝑦 = 𝑘

𝑐𝑥 + 𝑑𝑦 = 𝑝
• In matrix form is written as
𝑎 𝑏 𝑥 𝑘
=
𝑐 𝑑 𝑦 𝑝
• This can be represented as AX = B
𝐵
X=𝐴
X= 𝐴−1 B
Example
• Solve the system of linear equation using
inverse method
2𝑥 + 4𝑦 = 16

𝑥 − 2𝑦 = −4
• In matrix form is written as
2 4 𝑥 16
𝑦 =
1 −2 −4
2 4 𝑥 16
Hence A = 𝑋= 𝑦 B=
1 −2 −4
−1 1 −2 −4
• 𝐴 =-
8 −1 2

Hence X= 𝐴−1 B
1 −2 −4 16
X=−
8 −1 2 −4
𝑥 2
=
𝑦 3
Example 2

Find the solution for the system of linear


equations
2 x  3 y  2 z  1

 x  2 y  3z  10
3x  y  4 z  26

Solution: In matrix form
2 3  2  x   1 
1 2    
3   y   10 

3 1 4   z  26
11 2 3 1 2 1 3
C11  ( 1)  11, C12  ( 1) 5
1 4 3 4
1 3 1 2 2 1 3 2
C13  ( 1)  7, C21  ( 1)  14
3 1 1 4
2 2 2 2 23 2 3
C22  ( 1)  14, C23  ( 1) 7
3 4 3 1
31 3 2 3 2 2 2
C31  ( 1)  5, C32  ( 1)  8
2 3 1 3
3 3 2 3
C33  ( 1)  7
1 2
• The cofactor matrix become
−11 5 7
C= −14 14 7
5 −8 −7
• Using the cofactors method, the determinant
of becomes
𝐴 =2(-11)+3(5)+-2(7)
𝐴 = -21
−11 −14 5
• Adj A = 𝐶 𝑇 = 5 14 −8
7 7 −7
• hence
 11  14 5 
 1 
1
A    5 14  8 
 21 
 7 7  7 
from
X  A1 B
 11  14 5   1  1
 1 
X    5 14  8  10   3
 21 
 7 7  7  26 5
Question: Determine whether the matrix given
below is invertible and if so, then find the
inverse. 1 5 2
B  0 1 2
0 0 1 
Hence use the answers above to solve the
following system linear equations
x  5y  2z  6

- y  2z  3
z  2

Leontief input – output Analysis
• The production of goods usually depends on the many
factors , which are also product of other industrial
processes.
• There fore, the total demand for a product will be the
summation of all the intermediate demand for the
product arising from the other producing firms plus the
final demand arising from the consumer, government,
investor
• The input – output matrices indicate the supply and
demand interrelationship that exist between various
sectors of economy during certain time period.
• To develop the input – output matrix, we
denote the output (in put produced) of the
industrial by xi, then the total of the I the
industrial is given by linear equation

X= 𝑎𝑖 𝑥𝑖 + 𝑎𝑖2 𝑥2 + 2 + ⋯ + 𝑎 + 𝑎 + 𝑎𝑖𝑛 𝑥𝑛

• To satisfy the demand for its product , the ith


industry must produce 𝑎𝑖 𝑥𝑖 units for the first
industry, 𝑎𝑖2 𝑥2 units for the second industry
and so on.
• The entire system of the equation for
the model as follows
𝑥1 = 𝑎11 𝑥1 + 𝑎12 𝑥2 + ⋯ + 𝑎1 𝑥𝑛
𝑥2 = 𝑎21 𝑥1 + 𝑎22 𝑥2 + ⋯ + 𝑎2 𝑥𝑛
⋮ ⋮ ⋮ ⋮ ⋮
𝑥𝑛 = 𝑎𝑛1 𝑥1 + 𝑎𝑛2 𝑥2 + ⋯ + 𝑎𝑛𝑛 𝑥𝑛

The matrix from this system is

You might also like