You are on page 1of 25

Fundamentals of Engineering Analysis

EGR 1302 The Inverse Matrix

Slide 1

2014 Baylor University

Solving Systems of Linear Equations


The Inverse Matrix
Anxn and Bnxn are Square Matrices of the same Order.
A * B = In
B * A = In
B is called The Inverse of A
in Algebra, the equivalent is x *

B = A-1

A * A-1 = I
Slide 2

2014 Baylor University

1
1
x

Solving Systems of Linear Equations

a11 x1 a12 x2 d1

Sum of Products

a21 x1 a22 x2 d 2

a11 a12 x1
d1
*
a

21 a22 x2
d2

A* x d
The same equation can represent any Order.

Slide 3

2014 Baylor University

Solving this System for x1, x2

( a11 x1 a12 x2

d1 ) a22
( a21 x1 a22 x2 d 2 ) a12
a11a22 x1 a12a22 x2 a22d1
Becomes

Subtract

a21a12 x1 a22a12 x2 a12d 2


(a11a22 a21a12 ) x1 a22d1 a12d 2
(a11a22 a21a12 ) x2 a21d1 a11d 2

a22 d1 a12d 2
x1
(a11a22 a21a12 )

Slide 4

2014 Baylor University

x2

a21d1 a11d 2
(a11a22 a21a12 )

Solving this System for x1, x2 (cont.)


factor out
the denominator

x1
a22d1 a12 d 2
1
x
a d a d
x
(
a
a

a
a
)
21 1
11 2
2
11 22
21 12
Sum of Products

x1
a22 a12 d1
1
*
x
a

a11 d 2
(a11a22 a21a12 )
21
2

A new Matrix C

Slide 5

2014 Baylor University

The Solution to

A* x d
x1
a22 a12 d1
1
x
a
* d
a
(
a
a

a
a
)
21
11
2
2
11 22
21 12

A1 * A * x A1 * d
where A1 * A * x I * x

x A1 * d
a22 a12
1
A
(a11a22 a21a12 ) a21 a11
1

We now have a solution for the Inverse of a 2x2 Matrix

Slide 6

2014 Baylor University

The Determinant

a22 a12
1
A

(a11a22 a21a12 ) a21 a11


1

a11 a12
A

a
a
21 22

The Determinant of A =

a11a22 a21a12

det A a11a22 a21a12


Slide 7

2014 Baylor University

Rules for Finding the Inverse of a 2x2 Matrix

a22 a12
1
A

(a11a22 a21a12 ) a21 a11


1

a11 a12
A

a
a
21 22
Rule 1: Swap the Main Diagonal
Rule 2: Change Signs on
the Back Diagonal
Rule 3: Divide by
the Determinant

Slide 8

2014 Baylor University

a22 a12
1
A

(a11a22 a21a12 ) a21 a11


1

Review of the Solution to a 2x2 System

A* x d

Is solved by

x A 1 * d
a22 a12
1
A

(a11a22 a21a12 ) a21 a11


1

det A a11a22 a21a12

If

det A 0!

there is no solution

Stay Tuned!

Slide 9

2014 Baylor University

A Numerical Example

2 x1 3 x2 4
x1 4 x2 2
Becomes

2 3 x1
4
1 4 * x 2

4 3
1
A
(2 * 4 (3 * 1)) 1 2
1

4 / 11 3 / 11
A

1
/
11
2
/
11

10 / 11
x

8
/
11

Slide 10

2014 Baylor University

4
2

The General (larger than 2x2) Solution to

A* x d
x A 1 * d
The 2x2 case:

a22 a12
1
A

(a11a22 a21a12 ) a21 a11


1

Already shown that this is det(A)

Call this the adjoint or adj(A)

Definition of adjoint:

a22
CfA
a12
The general case:

Slide 11

2014 Baylor University

a21
a11

a22
adj( A) CfA
a21

T
adj
(
A
)
CfA
A1

det( A)
A

a12
a11

This is the
definition of the
inverse for any
matrix!

Gaussian Elimination & Solutions of Linear


Systems
Fundamentals of Engineering Analysis
EGR 1302

Slide 12

2014 Baylor University

The Need for a General Solution to Linear Systems

x3

x1 2 x 2 x3 7
the system 2 x 3 x x 2
2
3
of equations 1
x1 x 2 2 x3 5
Unique Solution, all
cross at the same
point, the solution

Det = 0

x2
x1

Slide 13

2014 Baylor University

We need a method of
finding a general solution
when the coefficient
matrix A is Singular.

Gaussian Elimination - A general solution Methodology

x1 2 x 2 x3 1
2 x1 3 x 2 x3 7
x1 4 x 2 2 x3 7
We will use three elementary row operations to solve this set of
linear equations by Gaussian Elimination.
Same as multiplying both
sides of an equation

Elementary Row Operations:


1. Multiply by a constant 2. Swap two rows -

'

ri k * ri

ri rj , rj ri

Order doesnt matter

3. Replace a row by adding to it another k*row -

Slide 14

'

ri ri k * rj
Same as elimination

2014 Baylor University

Using Elementary Row Operations


to Solve by Gaussian Elimination
Step 1: Use Rule 3 to eliminate

x1 from rows 2 & 3:

x1 2 x 2 x3 1

1. Keep Row 1 the same

2 x1 3 x 2 x3 7

2. r2 r2 2 * r1

0 7 x2 x3 5

x1 4 x 2 2 x3 7

3.

0 2 x2 3x3 8

'

'

r3 r3 r1

Step 2: Use Rule 3 to eliminate

x2 from row 3:

x1 2 x2 x3 1

x1 2 x2 x3 1

x1 2 x2 x3 1

1. Keep Row 1 the same

0 7 x2 x3 5

2. Keep Row 2 the same

0 7 x2 x3 5

2
3. r3 r3 r2
7

23
46
0 0 x3
7
7

0 2 x2 3x3 8

'

Step 3: Use Rule 1 to reduce all coefficients to 1:


1. Keep Row 1 the same
x1 2 x2 x3 1

0 7 x2 x3 5
0 0 23 x3 46
7
7
Slide 15

2014 Baylor University

1
r2 r2
7
7
'
r

r3
3. 3
23

2.

'

x1 2 x2 x3 1
1
5
x3
7
7
0 0 x3 2
x2 1
x1 1
0 x2

The Augmented Matrix


augmented matrix

x1 2 x 2 x3 1
2 x1 3 x 2 x3 7

can be represented as

x1 4 x 2 2 x3 7
Step 1 - 1. Keep Row 1 the same
'

2. r2 r2 2 * r1
3.

'

r3 r3 r1

Step 2 - 1. Keep Row 1 the same


2. Keep Row 2 the same

2
3. r3 r3 r2
7
'

Step 3 - 1. Keep Row 1 the same


2.

1
r2 r2
7
'

7
r

r3
3. 3
23
'

Slide 16

2014 Baylor University

1 2
0 1
0 0

1
1
7
1

1
1 2 1
2 3 1 7

1 4 2 7

1 2
0 7

1
5
0 2 3 8

1 2
0 7

1
1

1
1
1
5

23
46
0
0

7
7

1
5

7
2

Row Echelon Form

Reduced Row Echelon Form of the Augmented Matrix

1 2

Using Backwards Substitution 0


on the Row Echelon Form

0 0

'

r1 r1 r3
1
r2 r2 * r3
7
'

'

r1 r1 2r2

1 0 0 1
0 1 0 1
Identity Matrix

Reduced Row Echelon Form


0 0 1 2
x 2 1
x3 2

Slide 17

2014 Baylor University

1
5

7
2

1 2 0 1
0 1 0 1

0 0 1 2

x1 1
Observe directly that

1
1
7
1

Using the TI-89 to do Gaussian Elimination

1
1 2 1
2 3 1 7

1 4 2 7
Save the augmented matrix as variable x34
Manual Result

TI-89 Result
Row Echelon Form use the function ref()

1 2
0 1
0 0

1
1
7
1

Note that calculator computes a different REF result,


by using a different algorithm, but the answer is still correct.

Reduced Row Echelon Form use the function rref()


Slide 18

2014 Baylor University

1
5

7
2

Compatible and Incompatible Solutions


x1 x2 x3 3
3x1 x2 3 x3 5
x1 x2 2 x3 2

'

r2 r2 3r1
'

r3 r3 r1

1
'
r3 r3 r2
2

1 1 1 3
3 1 3 5

1 1 2 2
1 1 1 3
0 4 6 4

0 2 3 1
1 1 1 3
0 4 6 4

0 0
0
1
implies 0 * x3 1?

This system has no solution


inconsistent
Slide 19

2014 Baylor University

Note: detA=0

The Infinite Solution


1 1 1 1
3 1 3 5

1 1 2 2
Same Row
operations

'

r2 r2 3r1
'

r3 r3 r1
1
r3 r3 r2
2
'

Change the System


detA still equals zero

1 1 1 1
0 4 6 2

0 2 3 1
1 1 1 1
0 4 6 2

0 0
0 0
implies 0 * x3 0

x3 :
1 3
4 x2 6 2, x2
2 2
1 3
3 1
x1 ( ) 1, x1
2 2
2 2

Slide 20

2014 Baylor University

x1
x
2
x3

3 1
2 2
1 3

2 2

This system has infinite


solutions, depending
on the value of

The Three General Solutions

det A 0

1
0 1

0 0 1 k

det A 0

1
0 1

0 0 0 k

2. None = No X3 exists

1
0 1

0 0 0 0

3. Infinite = X3 exists as any value

det A 0

Slide 21

2014 Baylor University

1. Unique = X3 exists as a single value

Graphic Examples of the Three General Solutions

2 x 10 y 2 z 10
12 x 3 y 6 z 5

rref()

4 x 3 y 7 z 12

1 0 0
0 1 0

0 0 1

571
585

103

809

585

unique

single point
of intersection
( X Y S) ( Xt Yt P) ( L M N)

all planes
intersect
on the same line

x y z 1
3x y 3z 5
x y 2z 2

rref()

1 0
0 1

0 0

infinite

( X Y S) ( Xt Yt P) ( L M N)

planes
parallel,
never
intersect

x y z 1
3 x y 3 z 22
x y 2z 2

rref()

1 0
0 1

0 0

0
0
1

no solution
( X Y S) ( Xt Yt P) ( L M N)

Slide 22

2014 Baylor University

585

Example of the Three General Solutions

Given

1 2 3 2
2 1 2 3

1 1 a b

'

r2 r2 2r1

2. No Solutions

b 1

3. Infinite Solutions a 1 b 1

Slide 23

2014 Baylor University

& r3 r3 r2

'

r3 r3 r1

1. Unique Solution a 1

a 1

'

det A 3( a 1)

b 1
a 1

3
2
1 2
0 3

0 0 a 1 b 1

x
Unknowns: y

z

k
0

0
0

The Homogeneous Set of Linear Equations


(Special Case)

Ax 0
Only 2 possible solutions: Either x 0 , a trivial solution, or
det A 0 , implying infinite solutions
det A k 5

x1 x2 x3 0
x1 2 x2 0
x1 3 x2 k * x3 0

1 1 1 0
1 2 0 0

1 3 k 0

When k=5, infinite solutions exist,


otherwise, there is no solution.
Slide 24

2014 Baylor University

rref()

1
0
1 1
0 1 1 0

0 0 k 5 0

x3
x2 0, x2
x1 0, x1 2

Questions?

Slide 25

2014 Baylor University

You might also like