Equation Matrix
Equation Matrix
Dr. Firoz
2-3: System of equations and matrices
Inconsistent (has no
Dependent
Independent
For Example: Consider the system
3 x 2 y 1
5 x 3 y 11
Solve it and see that it has a unique solution. The system is consistent
and independent.
The system
x y 4
2x 2 y 3
Is inconsistent, it has no solution. Check the solution.
Now the system
x y 4
2x 2 y 8
has infinitely many solutions, it is consistent and dependent.
We can solve it by the following methods:
1.
2.
3.
4.
5.
6.
Definition: The following representation of two linear equations is called the system of
linear equations in two variables:
1
x1 2 x 2 3
2 x1 x 2 1
Solution: A solution of the given system is an ordered set or list of numbers that satisfies
all the equations simultaneously when we put x1 a and x 2 b . This solution is written
as ( x1 , x 2 ) ( a, b) . We have our solution in this case as ( x1 , x 2 ) (1,1) .
If the given system has at least one solution, it is said to be consistent. When the system
has no solution, it is said to be inconsistent.
Examples
1. The system x1 2 x 2 3 , 2 x1 x 2 1 has unique solution. Find the solution.
2. The system x1 x2 2 2 x3 , x3 3 x2 3 has infinitely many solutions.. Write
the solution in terms of the third variable.
3. The system 2 x1 2 x2 2 , x1 x2 3 is inconsistent.
4. Solve the system 4 x1 3 x2 10 , 3x1 2 x2 18
5. If the system 2 x1 kx2 5 , x1 3 x2 7 is inconsistent find k.
6. Solve the system x1 2 x2 x3 4 , x1 3 x2 2 x3 4 , 2 x1 4 x2 x3 1
7. Consider this 2 by 2 system: use all the methods discussed
above to solve the system:
3 x 2 y 1
5 x 3 y 11
Solution:
a)
3(3 x 2 y 1) 9 x 6 y 3
19 x 19 x 1
2(5 x 3 y 11) 10 x 6 y 22
By substituting x 1 we get y 2
b)
3 x 2 y 1 y 3 / 2 x 1/ 2
So we can substitute y 3 / 2 x 1/ 2 in other equation
5 x 3 3 / 2 x 1/ 2 11 x 1
c)
3
1
3 x 2 y 1 y x
2
3
5
11
5 x 3 y 11 y x
3
3
d)
1
2/3
1/ 3
1 2 / 3 1/ 3
3 2 1 1 2 / 3 1/ 3
11
0 19 / 3 38 / 3
0
1 2
5 3 11 5 3
The last row gives y 2 , and by backward substitute we get
x 1
or
x 13 z 6 y
x y 13 z 6
2 x 6 y z 1
2 x 6 y z 1
Augmented Matrix:
1 2 4
1 1 13
2 6 1
6
6
1
Multiply row 1 by 1 and add with row 2 and get your new row 2
1 2 4
0 3 9
2 6 1
6
0 ; R2 R2 1R1
1
Multiply 2 with row 1 and add with row 3 and get your new row 3
1 2 4
0 3 9
0 2 7
6
0 ; R3 R3 2 R1
11
1 2 4
0 1 3
0 2 7
6
1
0 ; R2 R2
3
11
Multiply by -2 with row 2 and add with row 3 and get your row 3
1 2 4
0 1 3
0 0 1
6
0 ; R3 R3 2 R2
11
y 3(11) 0
y 33
2 1 1
1 3 2
1 1 1
Now practice:
solve.
x 2(6) 4(11) 6
x 104
2
1
2
a.
b.
[
[
]
]
1 0 0 3
0 1 0 2 The system has unique solution with x=3, y=-2, z=5
0 0 1 5
1 0 2 0
0 1 4 0
0 0 0 1
c.
1 0 2 0
0 1 3 0
0 0 0 0
d
ad bc c a
c
2
3
then A (9 10) 19 0
Example: A
5 3
Therefore A is not singular matrix. It has inverse. Find the inverse.
And verify that A1 A AA1 I . What is I ? Answer: I is an identity
matrix.
Finding Determinant of a 3 by 3 matrix
1 2 4
A 1 1 13
2 6 1
| A | 1
13
( 2)
13
2 1
2 6
2 3 4
4 3 1
1 2 4
2
4
1
3
3
2
A 59 64 5
24 + 3 + 32 = 59
8 3 4
Exercise 1. Use Sarrus rule to evaluate the determinant A 4 6 1 and verify
5 2 4
your answer using calculator.
d
a
ad bc c
c
Example:
2
3
3
1
1
then A
3(3) 5(2) 5
5 3
2
3
2
3
19 19
5 3
19 19
Method 3 (Optional).
A-1 =
2
4
Adjoint method
(adjoint of A) or A-1 =
2 3 4
10 4 9
1
1
15 4
14
Let A 4 3 1 , then A 5 and A
5
1 2 4
5
1 6
Now we know how to find inverse, lets go back to solution of system of
equations:
3 x 2 y 1
5 x 3 y 11
5 3
x
X
y
11
AX B
X A1 B
2
3
3
1
1
then A
3(3) 5(2) 5
5 3
2
3
x
19 19
Now
y
5 3
19 19
1
11
2
3
2
3
19 19
5 3
19 19
so x 1 and y 2
2
Now, x
Dx 19
1 and
D 19
Dx
1
11
Dy
D
2
(3 22) 19
3
38
2
19
9
is obtained by replacing the x-coefficients in the first column of D with the constants
from the right sides of the equations.
is obtained by replacing the y-coefficients in the second column of D with the
constants from the right sides of the equations.
is obtained by replacing the z-coefficients in the third column of D with the constants
from the right sides of the equations.
Next, we evaluate the four determinants:
= 55
11
x1 x 2 3 x3 5
2 x 2 x3 1
3 x1 2 x 2 2 x3 1
Solution: Now applying the operation R3 r3 3r1 we have the following
x1 x 2 3x3 5
2 x 2 x3 1
5 x 2 11x3 16
Applying R2 1 / 2 r2 we have
12
x1 x 2 3x3 5
x 2 .5 x3 .5
5 x 2 11x3 16
And by R3 r3 5r2
x1 x 2 3 x3 5
x 2 .5 x3 .5
13.5 x3 13.5
Finally we the following by applying R3 r2 / 13.5
x1 x 2 3 x3 5
x 2 .5 x3 .5
x3 1
We now have that x3 1 , and other unknowns can easily be found by backward
substitution into second and first equations. We have the solution ( x1 , x 2 , x3 ) (1, 1, 1) .
This method is called the Gaussian Elimination method.
Augmented matrix: Let us consider the system of equations
x1 x 2 3 x3 5
2 x 2 x3 1
3 x1 2 x 2 2 x3 1
1
2
3
1
1
1
0
0
.5
0
0
0
1
0
0
1 . The left hand side of the vertical bar is the identity matrix.
1
13
CASIO:
1. Go to MENU, choose MAT, use right arrow to select size and edit your matrix
2. Go to OPTION and Press F1 for row operation
Example 2: Find the value of K so that the given system has no solution:
x1 x 2 x3 6
2 x1 x 2 x3 3
x1 2 x 2 Kx3 0
Solution: Find the determinant value of the coefficient matrix and set equal to zero.
1
2
1
1
1
2
1
1 0
K
x 4y 1
Example: Use Cramers Rule to explain why the system
has no solution.
2x 8 y 3
Section: Matrices and Matrix Operations
Matrix: A matrix is simply a rectangular array of numbers considered as an entity. A
matrix with m rows and n columns in the array is written as follows:
14
a11
a
A 21
a
m1
a1n
a2n
a12
a 22
a mn
am2
b11
b21
which is of order m 1
b
m1
3 7
5
, B
5 12
3
Example 1. Given A
results:
a) A 2 B C
5 6
and C
. Find the following
4
5 10
b) A B 0.5C
x y 2 2
6
0 0
4
x 6
5 2 x y 5
Example 3.
5
4 10
1 3 2
A 2 3
B 2 3 0
C 1
6
0 1 5
9
4
A is a matrix 3 by 2, B is 3 by 3, C is 3 by 2
A B Not Possible
0
3
7
10 0
45
A C 2 (1) 3 3
6 4
9 7
A C
10
9
3 0
10 16
45
10 0 1 10
1 6
2 (1) 3 3
2
64
9 7 2
Example 4.
15
4 10
A 2 3
9
6
1 3 2
B 2 3 0
0 1 5
6
D 1
0
E 1 3
C 1
0
3
7
1 2
F
7
8
2 5
G
1 6
3A-2C 3 2 3 2 1
0 1 5
6
4
9
5 17
1 2
2 5
3
7
11 25
8
1 6
F 3G
4. 2B-5C
2
0
3 4
7
10
30
15
13
2
6
Consider A
x
,
y
1
B
5
p
3
2
t
, C
r
s
3
2
bc
1 a
Answer is zero.
Example 1. Given A
results:
a) BC
b) AB
5 6
and C
. Find the following
4
5 10
c) BC CA
16
Example 2. Find x
4 5 4 x
x 2 1 5 0 1 1 O
4 35 3 0
x
4 x 6 5 x 35 4 x 5 1 O
0
x 4 x 6 5 x 35 3(4 x 5) O
4 x 2 6 x 5 x 35 12 x 15 0
2
A
6
Example 4. Let
2a 2(1 a ) 6a 2(1 a )
0
2(1 a ) 2a 6(1 a ) 2a
3
1
,
3
1 4
B
5 3
2
4
, C
2
5
3a
3(1 a )
3
.
2
Determine the
a)
b)
c)
d)
Sum A + 3B.
33
16
Matrix Multiplication:
Matrix Multiplication is possible if number of column of first matrix is equal to number
of row of 2nd matrix.
Example :
4 10
A 2 3
6
9
1 3 2
B 2 3 0
0 1 5
C 1
0
3
7
17
1(4) 3( 2) 2(6)
BA 2(4) 3(2) 0(6)
0(4) 1(2) 5(6)
1(10) 3( 3) 2(9)
2(10) 3(3) 0(9)
0(10) 1(3) 5(9)
10
2
28
19
11
42
, D
0.3 0.4
400
1 1
2
3
4
. Calculate A , A , A , then look at the pattern and find An ,
0 1
1 n
n
for n, a positive integer.
Answer: A
0 1
Example 6. Let A
Section 7.5 Rules for Matrix Multiplication (More examples Page # 282)
Example 1. Suppose P, and Q are n n square matrices such that PQ Q 2 P . Prove that
( PQ) 2 Q 6 P 2 .
18
6 2
2 0
1 4
2
1
Example 3. A
, show that det(3 A) 3 det( A) , find also det((3 A) )
0
1
a b
2
, then A (a d ) A (ad bc) I , where I is a 2 by
c
d
b
a b
1
ad bc
1
A
then A
ad bc c a
c
c d
ad bc
1
1
Now verify that AA A A I
b
ad bc
ad bc
19
x y z 12
2 x y 2 z 3
x 2y z 6
y
2 1 2
1 2 1
z
x
y
z
1 1
12
1 1 1
2 1 2
1 2 1
2 4
1
27
4
12
3 1 1 12
3 4 0 4 3 6
4
45
6
5 1 3 6
4
Example 5. Show that the following system has no solution using inverse matrix method.
x y z 12
2 x y 2 z 3
x 2y z 6
b
c
, B
a
d
1/ 2
1
, B
0
1
d
show that | AB || BA |
c
1
2
2
2
2
, calculate | A | | A | , | B | | B |
1
.2 .6 .2
5a
2
1
1 a
0 a(1 a )(a 6)
Exercise 4. Show that 2
1
0 1 a
5a
2
1
1 a
0 0 find all values of a. Answer: a 0, 1, 6
Exercise 5. If 2
1
0 1 a
20
2x2
4x
Exercise 6. If A
3 x 1
dA
determine det
x 1
dx
Answer: 4 x 12
More examples:
Determinant:
2 by 2:
2 3
18 15 3
5 9
a 2 1
a 3
2 3
2 a
2
1
a (a 2 6) 2(2a 3) 1(4 a)
3 by 3: 2 a 3 a
2 a
1 a
1 2
1 2 a
Another way of expansion (making two zeros by operation)
R1 aR3 0
a 2 1 R1
2 2a 1 a 2
R2 R2 2 R3
2
1 a
2 2a 1 a 2
2 a 3
0 a 4 3 2a 1
(1 a)
a 4 3 2a
a 4 3 2a
1 2 a
1
2
a
(1 a )(6 4a (a 2 3a 4)) (1 a)(10 a a 2 ) (a 1)(a 2 a 10)
Now verify the following:
1.
7 17 29
a) 11 19 31 36
13 23 37
3 4 0
c) 2 1 3 28
1 4 4
1 x
b) 1 y
1 z
c)
1
2
3
a a b a(b 3a )
a 0 b
1
2
d) a
a3
1
b2
b3
1
c 2 (a b)(b c)(c a )(ab bc ca )
c3
21
e)
a
b
c
2
2
a
b
c 2 (a b)(b c)(c a )(a b c)
bc ca ab
f)
1
1
1
2
2
a bc b ca c ab (a b)(b c )(c a )(a 2 b 2 c 2 )
a3
b3
c3
2
bc
a
a
b
ca
b 4abc
g)
c
c
ab
( a b) 2
ca
h)
bc
i)
ca
(b c) 2
ab
bc
ab 2abc( a b c )3
(c a ) 2
abc
a
b
c
b c 2a
b
2(a b c )3
c
a
c a 2b
b) a b c 0
1
2
3
c) a a b 0
a 0 b
c) a b 0
Matrices:
5 3
2
, find A
2
4
1
2
5. Given A , B 3 2 4 5 find BA
3
4
5 3
5 2
6. For a given matrix A
, the transpose is A
22
9. Suppose that A 2 1
1 1
4
10. Given 1 x
3
1
3 , and f ( x) x 2 5 x 6 find f ( A)
0
4 8
1 2
z
3 6
4
1
, find x, y and z
11. Solve the following system using both Cramers rule and matrix inverse:
5a 6b 4c 15
2 x 3 y z 110
2x 3y 3
a)
b) 7 a 4b 3c 19
c) 3 x 5 y 2 z 190
4 x y 11
2a b 6c 46
3 z y x 120
2 x 3 y z 12 0
d) 3 x 4 y 11z 46
5 y 4z 5
2x y 5
3 x 2 y 3
e)
240 750
1200 1500
210
and the demand matrix D
12. Given an input matrix A
.
330
720 450
1200 1500
Find the output matrix X, such that ( I A) X D
2x 3y 3
13. Find k so the system has no solution:
kx y 11
2x 3y 3
14. How do you determine whether the system
has infinitely many
x 1.5 y 11
solutions or no solution at all?
2x 3y 3
15. How do you determine whether the system
has infinitely many
x 1.5 y 1.5
solutions or no solution at all?
16. Find an equilibrium vector for the transition matrix given below:
23
z ], x y z 1 such
24