You are on page 1of 10

MATH1031 Mathematics for Life Sciences

Term 3, 2021

Matrix Equations

Dr. Joshua Capel


Red Centre Room 5107

Based on the slides provided by Dr. Chi Mak

School of Mathematics and Statistics


University of New South Wales
j.capel@unsw.edu.au

Joshua Capel (UNSW) MATH1031 1 / 10


Solving Matrix Equations

This lecture we will learn how to solve matrix equations using matrix
inverses.
If
   
2 4 10
A= and B =
1 −3 −5
and we are asked to solve the equation
AX = B to find X ,
what is X ?
A number?
A matrix?
If it is a matrix, what order matrix?

Joshua Capel (UNSW) Matrix Equations 2 / 10


What is the order of the matrix X ?

We have the matrix equation

  AX = B  
2 4 10
X =
1 −3 |{z} −5
| {z } ?×? | {z }
2×2 2×1

The sizes must match, so X must be order:

Joshua Capel (UNSW) Matrix Equations 3 / 10


Solving Matrix Equations

In algebra, we would do the following:

ax =b
5x = 10
1
1 x = ×b
x = 5 × 10 a
x = a−1 b
For our matrix equation:

AX = B
−1
A AX = A−1 B
IX = A−1 B
X = A−1 B

Joshua Capel (UNSW) Matrix Equations 4 / 10


The order of the matrices matters!

Example. If A−1 exists then

AX = B
=⇒ X = A−1 B.

Example. If A−1 exists then

XA = B
=⇒ X = B A−1 .

REMEMBER: the order in which you multiply matrices is important!

Joshua Capel (UNSW) Matrix Equations 5 / 10


Solving Matrix Equations

Example. Returning to our original problem:


If    
3 2 10
A= and B = ,
5 4 −5
solve the equation for X .

Further if D = −2 1 , solve XA = D,

Joshua Capel (UNSW) Matrix Equations 6 / 10


Solving Matrix Equations

Example.    
3 1 1 0
A= , B= .
1 4 3 1
Solve AX = 2X + B

Joshua Capel (UNSW) Matrix Equations 7 / 10


Example application

Example.
A manufacturing company has by-products SO2 and CO from each of 2
plants P1 and P2.
P1 produces, per day, 80kg of SO2 and 25kg of CO.
P2 produces, per day, 65kg of SO2 and 25kg of CO.
All of these must be eliminated before they reach the environment.
The company finds that the total cost of removal is $291 at plant P1 and
$277 at plant P2.

What is the average cost, to the nearest cent, of removing 1kg of SO2 and
1kg of CO?

Joshua Capel (UNSW) Matrix Equations 8 / 10


A worked example

Example. If
   
4 2 −2 1
B =  1 , A =  1 −1 1 
−3 2 −1 2
 
1 −3 1
and C =  0 −2 1 
−1 2 0
Check AC = I, i.e. C = A−1 .
Hence solve the equation AX = B.

Solutions.
    
2 −2 1 1 −3 1 2 − 1 −6 + 4 + 2 2 − 2
AC = 1 −1 1   0 −2 1  = 1 − 1 −3 + 2 + 2 1 − 1
2 −1 2 −1 2 0 2 − 2 −6 + 2 + 4 2 − 1

Joshua Capel (UNSW) Matrix Equations 9 / 10


 
1 0 0
= 0 1 0  .
0 0 1
Hence C = A−1 .

AX = B
−1
A AX = A−1 B
IX = CB
  
1 −3 1 4
X =  0 −2 1   1
−1 2 0 −3
 
4−3−3
=  0−2−3
−4 + 2 + 0
 
−2
= −5 
−2
Joshua Capel (UNSW) Matrix Equations 10 / 10

You might also like