Documente Academic
Documente Profesional
Documente Cultură
Definition 1.1: The number of rows in a matrix is called the row dimension of the matrix and the
number of columns is called the column dimension. A matrix with M rows and N columns is
called an M × N matrix and has MN elements.
Notice that the row dimension is always stated first, followed by the column dimension. Through-
out this review, symbolic matrices will always be denoted using boldface type, while the elements
of matrices will be put in square brackets. For example, a 3 × 4 matrix of ones would be denoted
by
1111
A = 1111 .
1111
If a matrix is used in a purely symbolic fashion, it may be helpful to indicate its dimensions. For
example if B is a 2 × 4 matrix and C is a 4 × 4 , then the product of B and C might be written as
B2 × 4 C4 × 4 .
Note 1.1: A matrix with only one row and one column is equivalent to a scalar.
Definition 1.2: If we turn every row in a given matrix, A, into a column in a new matrix, B, the
new matrix, B, is called the transpose of A, denoted by B = A T . If A is M × N , then B will be
N × M.
Example 1.1: If
3 1
A = 3 –2 0 then A T = .
–2 5
1 5 –4
0 –4
Definition 1.3: A matrix with M rows and one column is called a vector., while a matrix with one
row and M columns is the transpose of a vector., but is not a vector itself.
Definition 1.4: Any ordered array of numbers or expressions can be considered a vector. For
Note 1.2: Vectors, by default, are always matrices with one column. Matrices with only one row
are the transpose of vectors, but are usually not referred to as vectors.
By convention, we will always “try” to use lower case letters for vectors and their trans-
poses and upper case letters for matrices whose row and column dimensions are both greater than
one. Notice that if a is an 1 × M vector and b is an M × 1 vector with the same elements as a,
they are not equal to one another, since they have different row and column dimensions.
A subscript notation is used to refer to the elements of a matrix. For example, if A is a
5 × 3 matrix, the element in row 4 and column 2 would be indicated by A 42 . Again, notice that
the row number is the first subscript, the column number is the second.
Definition 1.5: If A M × N has elements A ij and B M × N has elements B ij , then their sum or differ-
ence is given by
AM × N + BM × N
CM × N = AM × N ± BM × N = , (1.1)
AM × N – BM × N
and the elements C ij of C M × N are computed using
A ij + B ij
C ij = A ij ± B ij = , i = 1, …, M, j = 1, …, N . (1.2)
A ij – B ij
Matrix addition and subtraction have the additional property that they are associative, i.e., they
satisfy
C = A + B = B + A and C = A – B = – B + A . (1.3)
A = 123 and B = z 2 –1 2 .
4 a z 4 5 6
C = A+B = z2 + 1 1 5 ,
8 a+5 z+6 2 ×3
while the difference is
C = A–B = – z2 + 1 3 1 .
0 a–5 z–6 2 ×3
1.3 Multiplication
A matrix can be multiplied by either a scalar or another matrix and each of these opera-
tions are discussed below.
1.3.1 Multiplying a Matrix by a Scalar
When a matrix is multiplied by a scalar, the result is a new matrix of the same size as the
original, where each element of the new matrix is multiplied by the scalar.
Definition 1.6: If x is a scalar and A is an M × N matrix, then the product of x with A is defined
by
B M × N = xA M × N = A M × N x , (1.4)
where
B ij = xA ij = A ij x, i = 1, …, M, j = 1, …, N . (1.5)
B = xA = 6 123 = 123 6 = 6 12 18 .
456 456 24 30 36
Definition 1.7: Two matrices, A M × N and B P × Q can be multiplied if and only if the column
dimension of the first equal to the row dimension of the second (i.e., N = P ). The result is a new
matrix, C R × S whose row dimension is equal to the row dimension of A (i.e., R = M ) and
whose column dimension is equal to the column dimension of B (i.e., S = Q ). Thus
AM × N BN × P = CM × P . (1.6)
Notice that in general, matrix multiplication is not commutative, i.e.,
CM × P = AM × N BN × P ≠ BN × P AM × N , (1.7)
except in the special case when M = P .
The elements of C are computed using
N
C ij = ∑ Aik Bkj, i = 1, …, M, j = 1, …, P . (1.8)
k=1
An equivalent way of thinking of Equation (1.8) is by taking the elements of row i of A and multi-
plying them by column j of B and adding the results. Hence if row i of A is a i and column j of B
is b j , then
C ij = a iT b j . (1.9)
Solution: The product is the 2 × 3 matrix C = AB and since A and B satisfy the rules for matrix
multiplication, then the elements of C are given by
3
C ij = ∑ Aik Bkj, i = 1, …, 2, j = 1, …, 3 .
k=1
Hence
C 11 = A 11 B 11 + A 12 B 21 + A 13 B 31 = 1 ( 9 ) + 2 ( 6 ) + 3 ( 3 ) = 30 ,
C 12 = A 11 B 12 + A 12 B 22 + A 13 B 23 = 1 ( 8 ) + 2 ( 5 ) + 3 ( 2 ) = 24 ,
C 13 = A 11 B 13 + A 12 B 23 + A 13 B 33 = 1 ( 7 ) + 2 ( 4 ) + 3 ( 1 ) = 18 ,
C 21 = A 21 B 11 + A 22 B 21 + A 23 B 31 = 4 ( 9 ) + 5 ( 6 ) + 6 ( 3 ) = 84 ,
C 22 = A 21 B 12 + A 22 B 22 + A 23 B 23 = 4 ( 8 ) + 5 ( 5 ) + 6 ( 2 ) = 69 ,
C 23 = A 21 B 13 + A 22 B 23 + A 23 B 33 = 4 ( 7 ) + 5 ( 4 ) + 6 ( 1 ) = 54 ,
and
C = 30 24 18 .
84 69 54
Note 1.3: Although the expressions above are correct, it is much easier to think of matrix multipli-
cation in terms of products of the rows of the first matrix times the columns of the second matrix.
Example 1.6: Since each row of a matrix is itself a matrix and each column of a matrix is also
matrix then we can write any matrix using these concepts. For example, the matrix B from the
previous example can be written in the following ways:
987 r1
B = 6 5 4 = r2 = c1 c2 c3 ,
321 r3
where
r1 = 9 8 7 , r2 = 6 5 4 , and r3 = 3 2 1 ,
are row matrices of B and
9 8 7
c1 = 6 , c2 = 5 , and c3 = 4 ,
3 2 1
are column matrices of B.
r 987
A = 123 = 1 and B = 6 5 4 = c1 c2 c3 ,
456 r2
321
then the product of A times B can be written in the form
r1 r1 c1 r1 c2 r1 c3
AB = c1 c2 c3 = ,
r2 r2 c1 r2 c2 r3 c3
where
9 8
C 11 = r 1 c 1 = 1 2 3 6 = 30 = 30 , C 12 = r 1 c 2 = 1 2 3 5 = 24 = 24 ,
3 2
7 9
C 13 = r 1 c 3 = 1 2 3 4 = 18 = 18 , C 21 = r 2 c 1 = 4 5 6 6 = 84 = 84 ,
1 3
8 7
C22 = r 2 c 2 = 4 5 6 5 = 69 = 69 , C23 = r 2 c 3 = 4 5 6 4 = 54 = 54 .
2 1
Hence
r1 r1 c1 r1 c2 r1 c3
C = AB = c1 c2 c3 = = 30 24 18 .
r2 r2 c1 r2 c2 r3 c3 84 69 54
The two kinds of multiplication discussed so far are the only kinds defined in classical
matrix analysis. However we should make note of the fact that some classical vector operations
can be represented in matrix notation.
Definition 1.8: The scalar (or dot or inner) product between two vectors
a = a 1 i 1 + a 2 i 2 + … + a N i N and b = b 1 i 1 + b 2 i 2 + … + b N i N ,
is defined by
a • b = a1 b1 + a2 b2 + … + aN bN = b • a ,
in classical vector notation. In matrix notation, we have
T T
aN × 1 = a1 a2 … aN and b N × 1 = b 1 b 2 … b N ,
and we see that
b1
b2
a NT × 1 b N × 1 = a 1 a 2 … a N = a 1 b 1 + a 2 b 2 + … + a N b N = b NT × 1 a N × 1 ,
…
bN
hence
a • b = aTb = b • a = bTa . (1.10)
Definition 1.10: The cross-product in classical vector notation can only be carried out between
two three dimensional vectors. The operation is defined by
a × b = ( a 2 b 3 – a 3 b 2 )i 1 + ( a 3 b 1 – a 1 b 3 )i 2 + ( a 1 b 2 – a 2 b 1 )i 3 = – ( b × a ) , (1.12)
in classical vector notation, while in matrix notation we have
a × b = Ab = Ba , – ( b × a ) = – A T b = – B T a (1.13)
where
0 a3 –a2 b1
A = –a3 0 a1 = –A T , b = b2 , (1.14)
a2 –a1 0 b3
and
0 b3 –b2 a1
B = –b3 0 b1 = –B T , a = a2 . (1.15)
b2 –b1 0 a3
a1 a1 b1 a1 b2 … a1 bN
a2 a2 b1 a2 b2 … a2 bN
a N × 1 b NT × 1 = b1 b2 … bN = = CN × N . (1.17)
… … … … …
aN aN b1 aN b2 … aN bN
1, i = j
I ij ≡ δ ij ≡ , i, j = 1, …, N , (1.24)
0, i ≠ j
Definition 1.14: The main diagonal of the N × N matrix A are the elements
A ii , i = 1, …, N , (1.26)
and is often displayed as a row matrix in the form
D = A 11 … A NN . (1.27)
The first sub–diagonal of A are the elements
A i, i – 1, i = 2, …, N , (1.28)
the second sub–diagonal of A are the elements
A i, i – 2, i = 3, …, N , (1.29)
and the j th sub–diagonal of A are the elements
A i, i – j, i = j + 1, …, N . (1.30)
The first super–diagonal of A are the elements
A i, i + 1, i = 1, …, N – 1 , (1.31)
the second super–diagonal of A are the elements
A i, i + 2, i = 1, …, N – 2 , (1.32)
and the j th super–diagonal of A are the elements
A i, i + j, i = 1, …, N – j . (1.33)
Definition 1.17: A tridiagonal matrix is a (1,1)–band matrix with the property that
A ij = 0 if i – j ≥ 2 . (1.39)
Definition 1.18: A pentadiagonal matrix is a (2,2)–band matrix with the property that
A ij = 0 if i – j ≥ 3 . (1.40)
Definition 1.19: If A is an N × N matrix, then the inverse of A is the N × N matrix B which sat-
isfies
AB = BA = I , (1.41)
where I is the N × N identity matrix. Symbolically, B = A –1 , hence we normally write
AA –1 = A –1 A = I . (1.42)
© R. L. Rankin R – 10 2/16/98
A Review of Matrix Analysis
Definition 1.20: If the N × N matrix A does not have an inverse, A is said to be singular. If A
does have an inverse, the matrix is said to be non–singular.
In the following sections, we will see the conditions necessary for an inverse to exist.
1.7 Determinant of a Matrix
The determinant is an operation on a square matrix which produces a scalar. Later on we
will see that the determinant is related to the question of invertibility.
A 11 A 12 A 13
A = A 21 A 22 A 23 , (1.50)
A 31 A 32 A 33
For matrices beyond 3 × 3 , the determinant is defined in terms of other operations, as shown
below.
Definition 1.22: If A is an N × N matrix with elements A ij , then the minor of A ij is the determi-
nant of the ( N – 1 ) × ( N – 1 ) matrix formed by deleting the i th row and j th column of A and is
denoted by M ij . Every element of A has a minor.
Definition 1.23: If A is an N × N matrix with minors M ij , then the cofactor of A ij is the number
© R. L. Rankin R – 11 2/16/98
A Review of Matrix Analysis
defined by
A ijC ≡ ( – 1 ) i + j M ij . (1.52)
The cofactors themselves form an N × N matrix, A C called the cofactor matrix of A.
Definition 1.24: If A is an N × N matrix with elements A ij and cofactors A ijC then the determi-
nant of A is defined by
N
∑ A ij A ij , expansion using row i
C
j=1
det ( A ) ≡ . (1.53)
N
∑ A ij A ijC, expansion using column j
i = 1
Definition 1.25: If A is an N × N matrix with cofactor matrix A C then the adjoint of A is the
N × N matrix defined by
adj ( A ) ≡ ( A C ) T . (1.54)
© R. L. Rankin R – 12 2/16/98
A Review of Matrix Analysis
Since det ( A ) = 400 “seems” to be very large, we might conclude that this matrix is not very
close to being singular. If we use Cramer’s rule and exact arithmetic, the inverse of A is
40002 – 800 20001
adj ( A ) – 30001 600 --------------- – 2
200
A –1 = ---------------- = ------------------------------------- = ,
det ( A ) 400 30001 3
– --------------- ---
400 2
and the corresponding “exact” solution to this system is
20001
--------------- – 2
200 200 –1
x = A –1 b = = .
30001 3 10001 1
– --------------- ---
400 2
© R. L. Rankin R – 13 2/16/98
A Review of Matrix Analysis
However, if we change b 1 from 200 to 201, we find that the solution changes to
20001
--------------- – 2
200 201 99.005
x = = .
30001 3 10001 – 74.0025
– --------------- ---
400 2
Definition 1.27: For the system Ax = b , whenever “small” changes in either A or b lead to
“large” changes in x, the system is said to be ill–conditioned and even though the determinant
“seems” large, the matrix A is “nearly” singular.
Clearly the determinant is not a good measure of how close a matrix is to being singular.
However, there is another measure of how close a matrix is to being singular called the condition
number of the matrix.
If we were able to perform all operations in infinite precision arithmetic, the every matrix
would always have a condition number of exactly one. However since all calculator and computer
operations are carried out in finite precision arithmetic, some matrices will have conditions num-
ber much larger than one.
If the condition number of a matrix is “small” then the matrix is well–conditioned and if it
is “large” then the matrix is ill–conditioned. We can use the following rule–of–thumb:
1. if cond ( A ) ≤ 1000 then the matrix is “well–conditioned” (far from being singular).
2. if cond ( A ) ≥ 10000 then the matrix is “ill–conditioned” (close to being singular).
3. if 1000 < cond ( A ) < 10000 then the matrix is in the gray area and may be either.
As with all rules–of–thumb, it is NOT always valid. In practice, we do not use the formal
definition of the condition number to compute its value, since this requires computing the inverse.
There are special techniques for estimating the condition of a matrix.
1.9 Trace of a Matrix
The trace is another operation on a square matrix which produces a scalar.
Definition 1.29: If A is an N × N matrix, then the trace of A is simply the sum of all the diagonal
© R. L. Rankin R – 14 2/16/98
A Review of Matrix Analysis
A1 = 123 , a2 = 4 , a 3T = and A 4 = .
9 10 11 12
567 8
Partitioning is advantageous when we want to isolate parts of a matrix to emphasize the
roles those parts play in matrix equations. For example, it can be shown that if the 6 × 6 matrix A
is partitioned in the form
P4 × 4 Q4 × 2
A6 × 6 = ,
R2 × 4 S2 × 2
and we define
W 2 × 2 ≡ S 2 × 2 – R 2 × 4 P 4–1× 4 Q 4 × 2 ,
and
X 4 × 4 ≡ P 4–1× 4 + P 4–1× 4 Q 4 × 2 W 2–1× 2 R 2 × 4 P 4–1× 4 ,
then the inverse of A is given by
X4 × 4 – P 4–1× 4 Q 4 × 2 W 2–1× 2
A 6–1× 6 = .
– W 2–1× 2 R 2 × 4 P 4–1× 4 W 2–1× 2
This means that we can invert a 6 × 6 matrix, A by inverting a 4 × 4 matrix, P and a 2 × 2
matrix, W.
© R. L. Rankin R – 15 2/16/98
A Review of Matrix Analysis
In order to simplify the task of dealing with such systems, we use matrix notation and define the
M × N coefficient matrix
A 11 A 12 … A 1N
A 21 A 22 … A 2N
A≡ , (1.2)
… … … …
A M1 A M2 … A MN
b1 x1
b2 x2
b≡ and x ≡ , (1.3)
… …
bM xN
© R. L. Rankin R – 16 2/16/98
A Review of Matrix Analysis
Definition 1.1: For an M × N matrix A, the three elementary row operations are:
ERO 1: interchange any two rows of A,
ERO 2: multiply any row of A by a nonzero scalar c,
ERO 3: replace the ith row of A by the sum of the ith row of A plus c times the jth row of A, for
i ≠ j.
Theorem 1.1: Performing any sequence of EROs on the system Ax = b does not change the
solution x.
In order to perform EROs we define the following elementary vectors and matrices.
Definition 1.2: An N × 1 elementary vector e i is a column vector of zeros except in the ith row,
where there is a one.
Solution: This vector is simply the 6 × 1 zero vector with a 1 in the 4th row, hence
T
e4 = 0 0 0 1 0 0 .
Definition 1.3: If A is an M × N matrix, then interchanging the ith and jth rows of A (ERO 1) is
equivalent to E ij A , where E ij is the M × M matrix obtained by interchanging the i th and jth rows
of the M × M identity matrix, I. The elementary matrix E ij has the property that E ij–1 = E ij .
Definition 1.4: If A is an M × N matrix, then multiplying the ith row of A by a nonzero constant c
(ERO 2) is equivalent to Q i ( c )A , where Q i ( c ) is the M × M matrix
Q i ( c ) = I + ( c – 1 )e i e iT . (1.6)
The elementary matrix Q i ( c ) has the property that
[ Q i ( c ) ] –1 = Q i --- .
1
(1.7)
c
© R. L. Rankin R – 17 2/16/98
A Review of Matrix Analysis
Definition 1.5: If A is an M × N matrix, then adding c times the jth row of A to the ith row of A
(ERO 3) is equivalent to R ij ( c )A , where R ij ( c ) is the M × M matrix
R ij ( c ) = I + ce i e Tj , i ≠ j (1.8)
The elementary matrix R ij ( c ) has the property that
[ R ij ( c ) ] –1 = R ij ( – c ) . (1.9)
Solution: The elementary matrix R 24 ( – 4.5 ) performs this operation and according to the quick
tip
1 0 0 0
R 24 ( – 4.5 ) = 0 1 0 – 4.5 .
0 0 1 0
0 0 0 1
Hence
1 0 0 0 3 4 2 –1 3 4 2 –1
A′ = 0 1 0 – 4.5 1 0 –2 3 = – 3.5 4.5 – 15.5 12 ,
0 0 1 0 5 –1 0 2 5 –1 0 2
0 0 0 1 1 –1 3 –2 1 –1 3 –2
which you can verify is the correct result.
Example 1.3: Multiply the 3rd row of the matrix A from the last example by 6.
Solution: The elementary matrix Q 3 ( 6 ) performs this operation and according to the quick tip
© R. L. Rankin R – 18 2/16/98
A Review of Matrix Analysis
1 0 0 0
Q3 ( 6 ) = 0 1 0 0 .
0 0 6 0
0 0 0 1
Hence
1 0 0 0 3 4 2 –1 3 4 2 –1
A′ = 0 1 0 0 1 0 –2 3 = 1 0 –2 3 ,
0 0 6 0 5 –1 0 2 30 –6 0 12
0 0 0 1 1 –1 3 –2 1 –1 3 –2
which you can verify is the correct result.
AN × ( N + 1 ) ′ = IN × N xN × 1 , (1.10)
and is equivalent to the backward elimination of Gaussian elimination.
Definition 1.8: The inverse of the matrix A N × N can be obtained by a slightly modified version of
Gauss-Jordan elimination. The process consists of performing ERO’s on the augmented matrix
A N × 2N ′ = A N × N e 1 e 2 … e N (1.11)
until the first N columns of A′ is the N × N identity matrix. At this point the last N columns of
A N × 2N ′ = I N × N A N–1× N , (1.12)
© R. L. Rankin R – 19 2/16/98
A Review of Matrix Analysis
2x + y – 2z = 1
4x – y + 2z = 5 ,
2x – y + z = 2
using elementary matrices and (a) Gaussian elimination. (b) Complete the operations necessary
for Gauss–Jordan elimination. (c) Using the results of part (b) to invert the coefficient matrix for
this system.
Solution: (a) The augmented matrix is
2 1 –2 1
A0 = 4 –1 2 5 ,
2 –1 1 2
and all the operations are shown below:
A 21 1 0 0 2 1 –2 1 2 1 –2 1
A 1 = R 21 – --------
- A = R 21 ( – 2 )A 0 = = ,
A 11 0 –2 1 0 4 –1 2 5 0 –3 6 3
0 0 1 2 –1 1 2 2 –1 1 2
A 31 1 0 0 2 1 –2 1 2 1 –2 1
A 2 = R 31 – --------
- A = R 31 ( – 1 )A 1 = = ,
A 11 1 0 1 0 0 –3 6 3 0 –3 6 3
–1 0 1 2 –1 1 2 0 –2 3 1
1 0 0
A 32 2 1 –2 1 2 1 –2 1
A 3 = R 32 – --------
- A = R 32 – --- A 2 =
2 0 1 0 = ,
A 22 2 3 2
0 –3 6 3 0 –3 6 3
0 – --- 1 0 – 2 3 1 0 0 –1 –1
3
which completes the forward elimination. The back–substitution then gives the gauss elimination
solution
x = 111 .
(b) If we want to perform Gauss–Jordan reduction, we continue with
A 23 1 0 0 2 1 –2 1 2 1 –2 1
A 4 = R 23 – --------
- A = R 23 ( 6 )A 3 = = ,
A 33 3 0 1 6 0 –3 6 3 0 –3 0 –3
0 0 1 0 0 –1 –1 0 0 –1 –1
A 13 1 0 –2 2 1 –2 1 2 1 0 3
A 5 = R 13 – --------
- A = R 13 ( – 2 )A 4 = = ,
A 33 4 0 1 0 0 –3 0 –3 0 –3 0 –3
0 0 1 0 0 –1 –1 0 0 –1 –1
1
A 12 1 --- 0 2 1 0 3 2 0 0 2
A 6 = R 12 – --------
- A 5 = R 12 --- A 5 =
1 3
0 –3 0 –3 = 0 –3 0 –3 ,
A 22 3 0 1 0
0 0 –1 –1 0 0 –1 –1
0 0 1
1
--- 0 0
2 2 0 0 2 1001
A 7 = Q 1 --- Q 2 – --- Q 3 ( – 1 )A 6 =
1 1
1 0 –3 0 –3 = 0101 = Ix ,
2 3 0 – --- 0
3 0 0 –1 –1 0011
0 0 –1
which completes the solution. Notice that we can do more than one operation at a time as in
© R. L. Rankin R – 20 2/16/98
A Review of Matrix Analysis
1
1 1 0 0 --- 0 0
--- 0 0 10 0 2
Q 1 --- Q 2 – --- Q 3 ( – 1 ) =
1 1 2 1
0 – --- 0 0 1 0 = 1 .
2 3 0 10 3 0 – --- 0
3
0 0 –1
0 01 0 0 1
0 0 –1
For Gaussian elimination, the entire sequence of operations for the forward elimination can be
summarized as
2 1 –2 1
A 3 = R 32 – --- R 31 ( – 1 )R 21 ( – 2 )A 0 =
2
0 –3 6 3 ,
3
0 0 –1 –1
and for Gauss–Jordan reduction, the sequence is
1 1 1 .
--- 0 0 1 1 0 0 --- --- 0
2 1 --- 0 1 0 – 2 1 0 0 1 00 1 00 6 6
3 0 1 0
= 1 01 0 016 0 1 0 –2 1 0 = 0 1 –2
0 – --- 0 0 1 0 2
3 0 0 1 0 0 1 0 – --- 1 – 1 0 1 0 0 1 1 2
0 0 1 3 – --- --- – 1
0 0 –1 3 3
Notice that
1 1
--- --- 0
6 6 2 1 –2 1 1001
PA 0 = 0 1 –2 4 –1 2 5 = 0101 = A7 = I x .
1 2 2 –1 1 2 0011
– --- --- – 1
3 3
(c) We have also performed all of the operations necessary to invert A. If we form the augmented
matrix
2 1 –2 1 0 0
B0 = A I = 4 –1 2 0 1 0 ,
2 –1 1 0 0 1
then
1 1 1 1
--- --- 0 1 0 0 --- --- 0
6 6 2 1 –2 1 0 0 6 6
PB 0 = 0 1 –2 4 –1 2 0 1 0 = 010 0 1 –2 = I A –1 ,
1 2 2 –1 1 0 0 1 1 2
– --- --- – 1 0 0 1 – --- --- – 1
3 3 3 3
hence
© R. L. Rankin R – 21 2/16/98
A Review of Matrix Analysis
1 1 1 0
A –1 = --- 0 6 – 12 ,
6
–2 4 –6
which we can check with
1 1 1 0 2 1 –2 1 600
AA –1 = A –1 A = --- 0 6 – 12 4 – 1 2 = --- 060 = I.
6 6
–2 4 –6 2 –1 1 006
r1
r2
A′ = .
…
rN
II. Perform Forward Elimination – perform the following elementary row operations on
each column of A′ in the order indicated:
Step 1. Eliminate column 1 of A′ by performing the N – 1 elementary row operations
A 21 A 31 A N1
r 2 – ---------r 1, r 3 – ---------r 1, …, r N – ----------r 1 .
A 11 A 11 A 11
Step 2. Eliminate column 2 of A′ by performing the N – 2 elementary row operations
A 32 A 42 A N2
r 3 – ---------r 2, r 4 – ---------r 2, …, r N – ----------r 2 .
A 22 A 22 A 22
Step 3. Eliminate column 3 of A′ by performing the N – 3 elementary row operations
A 43 A 53 A N3
-r 3, r 5 – --------
r 4 – -------- -r 3, …, r N – ---------
-r .
A 33 A 33 A 33 3
...
Step N - 1.Eliminate column N – 1 of A′ by performing the following N – ( N – 1 ) = 1 ele-
mentary row operation
A N, N – 1
r N – -------------------------- r N – 1 .
A N – 1, N – 1
III. Backward Elimination – upon completing II, the matrix A′ will be upper triangular and
© R. L. Rankin R – 22 2/16/98
A Review of Matrix Analysis
starting with the last equation, we perform the following operations in the order indicated:
A N, N + 1
Step 1. x N = -------------------
-.
A NN
A N – 1, N + 1 – A N – 1, N x N
Step 2. x N – 1 = -----------------------------------------------------------
-.
A N – 1, N – 1
A N – 2, N + 1 – A N – 2, N – 1 x N – 1 – A N – 2, N x N
Step 3. x N – 2 = ---------------------------------------------------------------------------------------------------------
-.
A N – 2, N – 2
...
A 2, N + 1 – A 2, 3 x 3 – A 2, 4 x 4 – … – A 2, N – 1 x N – 1 – A 2, N x N
Step N - 1. x 2 = --------------------------------------------------------------------------------------------------------------------------------------------
-.
A 2, 2
A 1, N + 1 – A 1, 2 x 2 – A 1, 3 x 3 – … – A 1, N – 1 x N – 1 – A 1, N x N
Step N. x 1 = --------------------------------------------------------------------------------------------------------------------------------------------
-.
A 1, 1
Forward Elimination of A: The following is pseudo-code for forward elimination of A without
using the augmented matrix.
k = 1 to n - 1
i = k + 1 to n
L ik ← A ik ⁄ A kk
j = k to n
A ij ← A ij – L ik A kj
next j
next i
next k
Backward Elimination: Pseudo-code for the backward elimination of b to get x (in this form of
the code, x is stored in b).
j = n downto 1
b j ← b j ⁄ A jj
i = 1 to j - 1
b i ← b i – A ij b j
next i
next j
1.4 Pivoting
The Gauss elimination process described above fails immediately if any main diagonal
element is zero or becomes zero during the forward elimination steps. In some cases this may
mean that no solution to the problem exists, in others, it is simply an artifact of the solution pro-
© R. L. Rankin R – 23 2/16/98
A Review of Matrix Analysis
Definition 1.9: Any element on the main diagonal of a matrix is called the pivot element and if the
row (or column) containing the pivot is interchanged with any other row (or column) the process
is called pivoting and pivoting can always be represented by the elementary matrix E ij .
If both rows and columns are pivoting, the process is called full pivoting and if only rows
or only columns are pivoted, the process is called partial pivoting.
Definition 1.10: Partial row pivoting is carried out by first identifying the element below the main
diagonal in the pivot row which is largest in absolute value. The row that this element is in and the
pivot row are then interchanged to accomplish the pivoting.
Example 1.5: Solve the following system using gauss elimination with partial row pivoting.
0 2 1 5
4 1 –1 x = –3 .
–2 3 –3 5
Since A 11 = 0 , then we must pivot before carrying out the elimination of the first column. Since
row 2 has the largest element in absolute value below A 11 , then we interchange rows 1 and 2 to
get
4 1 –1 –3
A 1 ′ = E 12 A 0 ′ = 0 2 1 5 ,
–2 3 –3 5
and then eliminate the rest of column 1:
4 1 –1 –3
A 2 ′ = R 31 ( 1 ⁄ 2 )A 1 ′ = 0 2 1 5 .
7 7 7
0 --- – --- ---
2 2 2
Although A 22 ≠ 0 , if pivoting is being used, it is used every time we eliminate a new column.
Thus, since 7/2 (in row 3) is larger than the 2 (in row 2), we must interchange rows 2 and 3 to get
4 1 –1 –3
A 3 ′ = E 23 A 2 ′ = 7
0 ---
7
– ---
7
--- .
2 2 2
0 2 1 5
Elimination of column 2 then yields
© R. L. Rankin R – 24 2/16/98
A Review of Matrix Analysis
4 1 –1 –3
A 4 ′ = R 32 ( 4 ⁄ 7 )A 3 ′ = 7
0 ---
7
– ---
7
--- = U b4 ,
2 2 2
0 0 3 3
Definition 1.11: Scaling is carried out before pivoting, by dividing the elements of each row of
the augmented matrix by the largest element in that row (excluding b i ).
– 0.844 15.6
x = 0.924 with errors ε = 7.60 %.
0.997 0.3
For (c), we first scale the matrix to get
© R. L. Rankin R – 25 2/16/98
A Review of Matrix Analysis
© R. L. Rankin R – 26 2/16/98