You are on page 1of 8

Using Matrices in Excel

Mathematics for Civil engineers


CIVE 1011Y(1)

Lecturer : Dr Proag

Videsha Beeslall
ID :1415346

4/25/2015

Using Excel

Introduction
In this assignment we consider the solving of linear equation in the form of matrix using excel. It
is quite an easy method compared to tradition one. Modern technologies have made our life
easier through different calculation problem. Papers are avoided and clean works are obtained by
using excel.
Simultaneous linear equations occur frequently in engineering in such areas as heat conduction,
molecular diffusion, fluid mechanics and in data regression. Excels Solver feature is used in a
to solve more complicated linear and nonlinear systems of equations.
Generally the term matrix (from mathematics) and array (from Excel) can be used
interchangeably to refer to data organized in row and column. Vectors are matrices consisting of
a single roe or column..Even though the functions are named with matrix there is no help in
Excel under matrix only array.

Using Excel

I.

Simultaneous equations in three order

Simultaneous linear equations occur frequently in engineering in such areas as heat conduction,
molecular diffusion, and fluid mechanics and in data regression. Excels Solver feature will be
used in a later chapter to solve more complicated linear and nonlinear systems of equations.
Consider the equations:
a1x +b1y +c1z + d1 = 0
a2x +b2y +c2z + d2 = 0
a3x +b3y +c3z + d3 = 0

If we find x, y and z by the elimination method, we obtain result that can be expressed in
determinant form thus:
X
c1
c2
c3

b1
b2
b3

=
d1
d2
d3

a1
a2
a3

Y
c1
c2
c3

d1
d2
d3

a1
a2
a3

Z
b1
b2
b3

c1
c2
c3

1
=
=
=

Note

x : the determinant of coefficient omitting te x terms.


The signs are alternating plus and minus

Using excel to solve equations


Find the value of x from the equations
2x +3y z -4 =0
3x +y + 2z -13 =0
x +2y 5z +11 =0

Using Excel

1. Equations are written in excel in this form:

2. Finding determinant
The determinant of a matrix is a single value and is often encountered in solving systems of
equations. Only square matrices have a determinant.
To find determinant, o , the last terms (d) is omitted and a determinant with the remaining
coefficients and constant terms is formed.
This is written in the excel as follows:

To find the determinant of a matrix, use the MDETERM function.

After typing such a formula and after entering the arrays, you "enter" it with three keys pressed
at once: CTRL, SHIFT and ENTER. This indicates that a matrix (array) result really is desired. I
4

Using Excel
The same is applied for finding determinant of x.

3. Finding values of x
The multiplication function is then used for calculating X. the MMULT function is used and the
values of determinant obtained are used as arrays and hence X is obtained.

1
=

=

X is hence obtained as 2.

Using Excel

II.

Solving linear equation in Matrix Form

A matrix is a set of real or complex number (or elements) arranged in a rows and columns to
form a rectangular array. The easier way to solve equation in the form of matrix is by the use of
excel. Solving equation is in the form of finding inverse matrix. Below is a list of steps of
solving a linear equation using the inverse matrix method:
Consider a new equation:
x +2y +z =4
3x -4y - 2z =2
5x +3y +5z =-1
In matrix form:

A.X =B
1
3
5

2
-4
3

1
-2
5

Matrix A

x
y
z

4
2
-1

Matrix X

Matrix B

Unknown Matrix X is to be found:

Inverse of a matrix
1. Write the equations in matrix form (coefficient matrix) x [unknown vector] = right
hand side vector. [A][x] = [b].

Using Excel

2. Inverse matrix of A
a. The cells where the resulting inverse of matrix A is to be placed is highlighted.

b. Once you have highlighted the resulting matrix, and while it is still highlighted, enter
the following formula: = MINVERSE (A2:C4)

c. When the formula is entered, press the Ctrl key and the Shift key simultaneously,
and then press the Enter key. This will change the formula you just wrote to: {=
MINVERSE(A2:C4)}
d. The resulting matrix will be:

3. Finding the unknown matrix X:


a.

b. The cells where the results is to be place is highlighted. (when a (3x3) matrix is
multiplied by a (3x1) matrix, a (3x1) matrix is formed.

Using Excel

c. The formula is entered. For multiplication MMULT is used.

d. While pressing Ctrl, SHIFT , we press the Enter key.. The resulting matrix si
therefore :

Hence, the equation is solved.


By using this method, equation in the form of a (60x60) matrix may be solved easily.