Lecture 6: Gauss Elimination: A Is A Diagonal Matrix
Lecture 6: Gauss Elimination: A Is A Diagonal Matrix
A is a Diagonal Matrix.
Let n = 3.
a11 x1 d1
a22 x = d
2 2
a3 x3 d3
Or ,
a11 x1 = d1
a22 x2 = d 2
a33 x3 = d3
So, if each aii 0, then xi = di / aii .
Consider the following system with three unknowns and three equations, whose
coefficient matrix is not upper or lower triangular.
2 x1 + 6 x2 + 8 x3 = 16
4 x1 + 15 x2 + 19 x3 = 38
2 x1 + 0 x2 + 3 x3 = 6
Or , Ax = d
2 6 8 x1 16
4 15 19 x = 38
2
2 0 3 x3 6
Or , as a 3 x 4 augmented matrix
2 6 8 16
[ A d ] = 4 15 19 38 .
2 0 3 6
We will try to transform this into an equivalent problem that has an upper triangular
coefficient matrix, which may be solved by a backward substitution. Often this can be
done by a combination of row (or equation) operations:
(i). interchange rows (or equations)
(ii). multiply rows (or equations) by a suitable constant and
(iii). add or subtract rows (or equations).
Row Operations on the Augmented Matrix:
We will try to transform the augmented matrix to an upper triangular matrix by
using row operations to make the left most column 0 below row 1.
row 2 2(row 1) or multiply [A d] by E21(-2) and then
row 3 1(row 1) or multiply E21(-2) [A d] by E31(-1) to get
2 6 8 16
E31 (1) E21 (2)[ A d ] = 0 3 3 6 .
0 6 5 10
See the Matlab demo gauss_el.m for additional examples. There are a number of
very good computer implementations of the Gauss elimination method. In Matlab the
simple command A\d can be used to compute the solution for most problems Ax = d.
Application to the Two-loop Circuit.
In lecture 4 we formulated the algebraic problem for the two-loop circuit problem:
1 1 1 i1 0
R 0 R3 i2 = E1 .
1
0 R2 R3 i3 E2
Let R1 = 1, R2 = 2, R3 = 3, E1 = 10 and E2 = 20.
The augemented matrix is
1 1 1 0
[ A d ] = 1 0 3 10 .
0 2 3 20