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

Equations −21 p1 + p 2=−9


7 p 1 +5 p2 + p3 =10
−5 p2 −8 p3 =3
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.

[ ]{ } { }
−21 1 0 p1 −9
7 5 1 p2 = 10 → A p=R
0 −5 −8 p3 3
We can solve this matrix equation as,

{} [
−1

]{ }
p1 −21 1 0 −9
p = A−1 R → p2 = 7 5 1 10
p3 0 −5 −8 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 i=2 i=3 P R This is in the form


Eq.1 -21 1 0 p1 -9
A P= R
Eq.2 7 5 1 p2 10 Therefore, −1
Eq.3 0 -5 -8 p3 3
P= A R

Doing this, the solution is given by: p1 0.503161


p2 1.566372
p3 -1.353982

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