You are on page 1of 1

Solving Simultaneous Equations in EXCEL

Procedure Simlutaneous equations can be easily solved using EXCEL


Assume that we have three equations in three unknowns, p1, p2, p3

21 p1 + p 2=9
7 p 1 +5 p2 + p3 =10
5 p2 8 p3 =3

Equations

These three equations can be arranged in to a matrix form, where,


all the coefficients on the left hand side will form a matrix, let us say, A
the variables can be arranged into a vector P. The right hand side can also be
arranged into another vector, say, R.

1
5
5

21
7
0

]{ } { }
]{ }
{} [
p1
p2
p3

0
1
8

9
= 10
3

A p=R

We can solve this matrix equation as,

p =A

p1
21
p2 =
7
0
p3

1
5
5

0
1
8

9
10
3

There is an EXCEL function for inverting the matrix: MINVERSE(array)


Similarly, there is function for multiplying two matrices: MMULT(array1,array2)
Using these two functions, we can get the required result.
To get the 3 values of "p" as a vector, select three cells in a column and type the command:
"=mmult( minverse(array1), array2) <ctrl+shift+Enter>"
where, "array1" represents the cell range for matrix A,
and "array2" represents the cell range for vector R
Note that you must select three cells in a column to get the three values p1, p2, and p3
You must also press <ctrl+shift+Enter> instead of simply entering the formula
This will generate the entire solution at once. Do not select only one cell
and try to drag the formula down.
i=1
Eq.1
Eq.2
Eq.3

i=2
-21
7
0

i=3
1
5
-5

Doing this, the solution is given by:

0
1
-8

P
p1
p2
p3

This is in the form


-9
1
10 Therefore,
3

p1
p2
p3

0.503161
1.566372
-1.353982

A P= R

P= A R

Note that the three equations must be solved simultaneously. All the unknown values of p will
come out of this somultaneous equation solution.

You might also like