You are on page 1of 5

845

Appendi x A
Solution of Simultaneous Equations Using Cramers Rule
In circuit analysis, we often encounter a set of simultaneous equations
having the form
a
11
x
1
+a
12
x
2
+ +a
1n
x
n
= b
1
a
21
x
1
+a
22
x
2
+ +a
2n
x
n
= b
2
.
.
.
.
.
.
.
.
.
a
n1
x
1
+a
n2
x
2
+ +a
nn
x
n
= b
n
(A.1)
where there are n unknown x
1
, x
2
, . . . , x
n
to be determined. Equation
(A.1) can be written in matrix form as

a
11
a
21
.
.
.
a
n1
a
12
a
22
.
.
.
a
n2
. . .
. . .
. . .
. . .
a
1n
a
2n
.
.
.
a
nn

x
1
x
2
.
.
.
x
n

b
2
b
2
.
.
.
b
n

(A.2)
This matrix equation can be put in a compact form as
AX = B (A.3)
where
A =

a
11
a
12
a
1n
a
21
a
22
a
2n
.
.
.
.
.
.
.
.
.
a
n1
a
n2
a
nn

, X =

x
1
x
2
.
.
.
x
n

, B =

b
1
b
2
.
.
.
b
n

(A.4)
A is a square (n n) matrix while X and B are column matrices.
There are several methods for solving Eq. (A.1) or (A.3). These
include substitution, Gaussian elimination, Cramers rule, and numerical
analysis. In many cases, Cramers rule can be used to solve the simul-
taneous equations we encounter in circuit analysis. Cramers rule states
that the solution to Eq. (A.1) or (A.3) is
x
1
=

1

x
2
=

2

.
.
.
x
n
=

n

(A.5)
| | | |
LL
e-Text Main Menu Textbook Table of Contents Problem Solving Workbook Contents
846 APPENDIX A Solution of Simultaneous Equations Using Cramers Rule
where the s are the determinants given by
=

a
11
a
12
a
1n
a
21
a
22
a
2n
.
.
.
.
.
.
.
.
.
a
n1
a
n2
a
nn

,
1
=

b
1
a
12
a
1n
b
2
a
22
a
2n
.
.
.
.
.
.
.
.
.
b
n
a
n2
a
nn

.
.
.
.
.
.

2
=

a
11
b
1
a
1n
a
21
b
2
a
2n
.
.
.
.
.
.
.
.
.
a
n1
b
n
a
nn

, . . . ,
n
=

a
11
a
12
b
1
a
21
a
22
b
2
.
.
.
.
.
.
.
.
.
a
n1
a
n2
b
n

(A.6)
Notice that is the determinant of matrix A and
k
is the determinant
of the matrix formed by replacing the kth column of A by B. It is evident
from Eq. (A.5) that Cramers rule applies only when = 0. When
= 0, the set of equations has no unique solution, because the equations
are linearly dependent.
The value of the determinant , for example, can be obtained by
expanding along the rst row:
=

a
11
a
12
a
13
a
1n
a
21
a
22
a
23
a
2n
a
31
a
32
a
33
a
3n
.
.
.
.
.
.
.
.
.
.
.
.
a
n1
a
n2
a
n3
a
nn

= a
11
M
11
a
12
M
12
+a
13
M
13
+ +(1)
1+n
a
1n
M
1n
(A.7)
where the minor M
ij
is an (n 1) (n 1) determinant of the matrix
formed by striking out the ith row and jth column. The value of may
also be obtained by expanding along the rst column:
= a
11
M
11
a
21
M
21
+a
31
M
31
+ +(1)
n+1
a
n1
M
n1
(A.8)
We now specically develop the formulas for calculating the deter-
minants of 22 and 33 matrices, because of their frequent occurrence
in this text. For a 2 2 matrix,
=

a
11
a
12
a
21
a
22

= a
11
a
22
a
12
a
21
(A.9)
For a 3 3 matrix,
=

a
11
a
12
a
13
a
21
a
22
a
23
a
31
a
32
a
33

= a
11
(1)
2

a
22
a
23
a
32
a
33

+ a
21
(1)
3

a
12
a
13
a
32
a
33

+ a
31
(1)
4

a
12
a
13
a
22
a
23

= a
11
(a
22
a
33
a
32
a
23
) a
21
(a
12
a
33
a
32
a
13
)
+ a
31
(a
12
a
23
a
22
a
13
)
(A.10)
Back Forward Main Menu Problem Solving Workbook TOC Textbook Website Student OLC MHHE Website
| | | |
LL
e-Text Main Menu Textbook Table of Contents Problem Solving Workbook Contents
APPENDIX A Solution of Simultaneous Equations Using Cramers Rule 847
An alternative method of obtaining the determinant of a 3 3 matrix is
by repeating the rst two rows and multiplying the terms diagonally as
follows.
= a
11
a
22
a
33
+ a
21
a
32
a
13
+ a
31
a
12
a
23
a
13
a
22
a
31
a
23
a
32
a
11
a
33
a
12
a
21

+
+
+
a
11
a
12
a
13
a
23
a
33
a
13
a
23
a
22
a
32
a
12
a
22
a
21
a
31
a
11
a
21
=
(A.11)
In summary:
The solution of linear simultaneous equations by Cramers rule boils down to nding
x
k
=

k

, k = 1, 2, . . . , n (A.12)
where is the determinant of matrix A and
k
is the determinant of the matrix
formed by replacing the kth column of A by B.
You may not nd much need to use Cramers method described in
this appendix, in view of the availability of calculators, computers, and
software packages such as Matlab, which can be used easily to solve a
set of linear equations. But in case you need to solve the equations by
hand, the material covered in this appendix becomes useful. At any rate,
it is important to know the mathematical basis of those calculators and
software packages.
One may use other methods, such as matrix in-
version and elimination. Only Cramers method
is covered here, because of its simplicity and also
because of the availability of powerful calculators.
E X A M P L E A . 1
Solve the simultaneous equations
4x
1
3x
2
= 17, 3x
1
+5x
2
= 21
Solution:
The given set of equations is cast in matrix form as

4 3
3 5

x
1
x
2

17
21

Back Forward Main Menu Problem Solving Workbook TOC Textbook Website Student OLC MHHE Website
| | | |
LL
e-Text Main Menu Textbook Table of Contents Problem Solving Workbook Contents
848 APPENDIX A Solution of Simultaneous Equations Using Cramers Rule
The determinants are evaluated as
=

4 3
3 5

= 4 5 (3)(3) = 11

1
=

17 3
21 5

= 17 5 (3)(21) = 22

2
=

4 17
3 21

= 4 (21) 17 (3) = 33
Hence,
x
1
=

1

=
22
11
= 2, x
2
=

2

=
33
11
= 3
P R A C T I C E P R O B L E M A . 1
Find the solution to the following simultaneous equations:
3x
1
x
2
= 4, 6x
1
+18x
2
= 16
Answer: x
1
= 1.833, x
2
= 1.5.
E X A M P L E A . 2
Determine x
1
, x
2
, and x
3
for this set of simultaneous equations:
25x
1
5x
2
20x
3
= 50
5x
1
+10x
2
4x
3
= 0
5x
1
4x
2
+9x
3
= 0
Solution:
In matrix form, the given set of equations becomes

25 5 20
5 10 4
5 4 9

x
1
x
2
x
3

50
0
0

We apply Eq. (A.11) to nd the determinants. This requires that we repeat


the rst two rows of the matrix. Thus,

+
+
+
= 25(10)9 + (5)(4)(20) + (5)(5)(4)
= 2250 400 100 1000 400 225 = 125
(20)(10)(5) (4)(4)25 9(5)(5)
25
25
10
10 5
5
5
5
5 = = 5
5
5
4
4
20
20
4
20
4
4
9
9
25
10
Back Forward Main Menu Problem Solving Workbook TOC Textbook Website Student OLC MHHE Website
| | | |
LL
e-Text Main Menu Textbook Table of Contents Problem Solving Workbook Contents
APPENDIX A Solution of Simultaneous Equations Using Cramers Rule 849
Similarly,

+
+
+
= 4500 + 0 + 0 0 800 0 = 3700
50
50
10
10 0
5
5
0
0 = = 0
0
5
4
4
20
20
4
20
4
4
9
9
50
10
1

+
+
+
= 0 + 0 + 1000 0 0 + 2250 = 3250
25
25
0
0 5
50
50
5
5 = = 5
5
50
4
4
20
20
4
20
0
0
9
9
25
0
2

+
+
+
= 0 + 1000 + 0 + 2500 0 0 = 3500
25
25
10
10 5
5
5
5
5 = = 5
5
5
0
0
50
50
0
50
4
4
0
0
25
10
3
Hence, we now nd
x
1
=

1

=
3700
125
= 29.6
x
2
=

2

=
3250
125
= 26
x
3
=

2

=
3500
125
= 28
P R A C T I C E P R O B L E M A . 2
Obtain the solution of this set of simultaneous equations
3x
1
x
2
2x
3
= 1
x
1
+6x
2
3x
3
= 0
2x
1
3x
2
+6x
3
= 6
Answer: x
1
= 3 = x
3
, x
2
= 2.
Back Forward Main Menu Problem Solving Workbook TOC Textbook Website Student OLC MHHE Website
| | | |
LL
e-Text Main Menu Textbook Table of Contents Problem Solving Workbook Contents

You might also like