# 10.6 Solving linear equations

 Page 1 / 1
This module explains how to use matrices to solve linear equations.

At this point, you may be left with a pretty negative feeling about matrices. The initial few ideas—adding matrices, subtracting them, multiplying a matrix by a constant, and matrix equality—seem almost too obvious to be worth talking about. On the other hand, multiplying matrices and taking determinants seem to be strange, arbitrary sequences of steps with little or no purpose.

A great deal of it comes together in solving linear equations. We have seen, in the chapter on simultaneous equations, how to solve two equations with two unknowns. But suppose we have three equations with three unknowns? Or four, or five? Such situations are more common than you might suppose in the real world. And even if you are allowed to use a calculator, it is not at all obvious how to solve such a problem in a reasonable amount of time.

Surprisingly, the things we have learned about matrix multiplication, about the identity matrix, about inverse matrices, and about matrix equality, give us a very fast way to solve such problems on a calculator!

Consider the following example, three equations with three unknowns:

$x+2y-z=11$
$2x-y+3z=7$
$7x-3y-2z=2$

Define a 3×3 matrix [A] which is the coefficients of all the variables on the left side of the equal signs:

$\left[A\right]=$ $\left[\begin{array}{ccc}1& 2& -1\\ 2& -1& 3\\ 7& -3& -2\end{array}\right]$

Define a 3×1 matrix [B] which is the numbers on the right side of the equal signs:

$\left[B\right]=$ $\left[\begin{array}{c}\text{11}\\ 7\\ 2\end{array}\right]$

Punch these matrices into your calculator, and then ask the calculator for [A-1][B]: that is, the inverse of matrix [A], multiplied by matrix [B].

The calculator responds with a 3×1 matrix which is all three answers . In this case, $x=3$ , $y=5$ , and $z=2$ .

The whole process takes no longer than it takes to punch a few matrices into the calculator. And it works just as quickly for 4 equations with 4 unknowns, or 5, etc.

## Huh? why the heck did that work?

Solving linear equations in this way is fast and easy. But with just a little work—and with the formalisms that we have developed so far about matrices—we can also show why this method works.

## Step 1: in which we replace three linear equations with one matrix equation

First of all, consider the following matrix equation:

$\left[\begin{array}{c}x+2y-z\\ 2x-y+3z\\ 7x-3y-2z\end{array}\right]$ $=$ $\left[\begin{array}{c}\text{11}\\ 7\\ 2\end{array}\right]$

The matrix on the left may look like a 3×3 matrix, but it is actually a 3×1 matrix. The top element is $x+2y-z$ (all one big number), and so on.

Remember what it means for two matrices to be equal to each other. They have to have the same dimensions ( ). And all the elements have to be equal to each other . So for this matrix equation to be true, all three of the following equations must be satisfied:

$x+2y–z=11$
$2x–y+3z=7$
$7x–3y–2z=2$

Look familiar? Hey, this is the three equations we started with! The point is that this one matrix equation is equivalent to those three linear equations . We can replace the original three equations with one matrix equation, and then set out to solve that.

## Step 2: in which we replace a simple matrix equation with a more complicated one

Do the following matrix multiplication. (You will need to do this by hand—since it has variables, your calculator can’t do it for you.)

$\left[\begin{array}{ccc}1& 2& -1\\ 2& -1& 3\\ 7& -3& -2\end{array}\right]$ $\left[\begin{array}{c}x\\ y\\ z\end{array}\right]$

If you did it correctly, you should have wound up with the following 3×1 matrix:

$\left[\begin{array}{c}x+2y-z\\ 2x-y+3z\\ 7x-3y-2z\end{array}\right]$

Once again, we pause to say…hey, that looks familiar! Yes, it’s the matrix that we used in Step 1. So we can now rewrite the matrix equation from Step 1 in this way:

$\left[\begin{array}{ccc}1& 2& -1\\ 2& -1& 3\\ 7& -3& -2\end{array}\right]$ $\left[\begin{array}{c}x\\ y\\ z\end{array}\right]$ $=$ $\left[\begin{array}{c}\text{11}\\ 7\\ 2\end{array}\right]$

Stop for a moment and make sure you’re following all this. I have shown, in two separate steps, that this matrix equation is equivalent to the three linear equations that we started with.

But this matrix equation has a nice property that the previous one did not. The first matrix (which we called [A] a long time ago) and the third one ([B]) contain only numbers. If we refer to the middle matrix as [X] then we can write our equation more concisely:

$\left[A\right]\left[X\right]=\left[B\right]$ , where $\left[A\right]=$ $\left[\begin{array}{ccc}1& 2& -1\\ 2& -1& 3\\ 7& -3& -2\end{array}\right]$ , $\left[X\right]=$ $\left[\begin{array}{c}x\\ y\\ z\end{array}\right]$ , and $\left[B\right]=$ $\left[\begin{array}{c}\text{11}\\ 7\\ 2\end{array}\right]$

Most importantly, $\left[X\right]$ contains the three variables we want to solve for! If we can solve this equation for $\left[X\right]$ we will have found our three variables $x$ , $y$ , and $z$ .

## Step 3: in which we solve a matrix equation

We have rewritten our original equations as $\left[A\right]\left[X\right]=\left[B\right]$ , and redefined our original goal as “solve this matrix equation for $\left[X\right]$ .” If these were numbers, we would divide both sides by $\left[A\right]$ . But these are matrices, and we have never defined a division operation for matrices. Fortunately, we can do something just as good, which is multiplying both sides by $\left[A{\right]}^{–1}$ . (Just as, with numbers, you can replace “dividing by 3” with “multiplying by $\frac{1}{3}$ .”)

Solving a Matrix Equation
$\left[A\right]\left[X\right]=\left[B\right]$ The problem.
$\left[A{\right]}^{–1}\left[A\right]\left[X\right]=\left[A{\right]}^{–1}\left[B\right]$ Multiply both sides by $\left[A{\right]}^{–1}$ , on the left. (Remember order matters! If we multiplied by $\left[A{\right]}^{–1}$ on the right, that would be doing something different.)
$\left[I\right]\left[X\right]=\left[A{\right]}^{–1}\left[B\right]$ $\left[A{\right]}^{–1}\left[A\right]=\left[I\right]$ by the definition of an inverse matrix.
$\left[X\right]=\left[A{\right]}^{–1}\left[B\right]$ $\left[I\right]$ times anything is itself, by definition of the identity matrix.

So we’re done! $\left[X\right]$ , which contains exactly the variables we are looking for, has been shown to be $\left[A{\right]}^{–1}\left[B\right]$ . This is why we can punch that formula into our calculator and find the answers instantly.

## Let’s try one more example

$5x–3y–2z=4$
$x+y–7z=7$
$10x–6y–4z=10$

We don’t have to derive the formula again—we can just use it. Enter the following into your calculator:

$\left[A\right]=$ $\left[\begin{array}{ccc}5& -3& -2\\ 1& 1& -7\\ \text{10}& -6& -4\end{array}\right]$ $\left[B\right]=$ $\left[\begin{array}{c}4\\ 7\\ \text{10}\end{array}\right]$

Then ask the calculator for $\left[A{\right]}^{–1}\left[B\right]$ .

The result?

What happened? To understand this error, try the following:

Hit ENTER to get out of the error, and then hit <MATRX> 1<MATRX>1 ) ENTER

Aha! Matrix $\left[A\right]$ has a determinant of 0. A matrix with 0 determinant has no inverse. So the operation you asked the calculator for, $\left[A{\right]}^{–1}\left[B\right]$ , is impossible.

What does this tell us about our original equations? They have no solution. To see why this is so, double the first equation and compare it with the third—it should become apparent that both equations cannot be true at the same time.

What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
it is a goid question and i want to know the answer as well
Maciej
Abigail
for teaching engĺish at school how nano technology help us
Anassong
Do somebody tell me a best nano engineering book for beginners?
there is no specific books for beginners but there is book called principle of nanotechnology
NANO
what is fullerene does it is used to make bukky balls
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
what is the Synthesis, properties,and applications of carbon nano chemistry
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
NANO
so some one know about replacing silicon atom with phosphorous in semiconductors device?
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
for screen printed electrodes ?
SUYASH
What is lattice structure?
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
what's the easiest and fastest way to the synthesize AgNP?
China
Cied
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Berger describes sociologists as concerned with
Got questions? Join the online conversation and get instant answers!