Aplications To Matrix Calculations System Solutions
Aplications To Matrix Calculations System Solutions
PII. S0895479898349720
May 30, 2000; published electronically October 25, 2000. This work was partially supported by
Iberdrola, the Leonardo Torres Quevedo Foundation of the University of Cantabria, and Dirección
General de Investigación Cientı́fica y Técnica (DGICYT) (project TIC96-0580).
http://www.siam.org/journals/simax/22-3/34972.html
† Department of Applied Mathematics and Computational Sciences, University of Cantabria,
In this paper we introduce the pivoting transformation and its applications only
from the algebraic point of view. Discussing the numerical properties and performance
of this method with respect to stability, ill conditioning, etc., which must be done
carefully and taking into account its applications (see Demmel [4] and Higham [7]),
will be the aim of another paper.
The paper is structured as follows. In section 2 the pivoting transformation is
introduced. In section 3 its main properties are discussed. In section 4 an orthogonal-
ization algorithm is derived. In section 5 some applications are given and illustrated
with examples. Finally, some conclusions are given in section 6.
where tjj = 0 and tjk , k = j, are arbitrary real numbers. In what follows we consider
that the vectors above are the columns of a matrix Vj .
This transformation can be formulated in matrix form as follows. Given a matrix
Vj = [v1j , . . . , vnj ], where vij , i = 1, . . . , n, are column vectors, a new matrix Vj+1 is
defined via
where M−1
j is the inverse of the matrix
T
(2.3) Mj = (e1 , . . . , ej−1 , tj , ej+1 , . . . , en ) ,
where ei is the ith column of the identity matrix, the transpose of tj being defined
by
1
t∗j = −tj1 , . . . , −tjj−1 , 1, −tjj+1 , . . . , −tjn .
tjj
Vj+1 Mj = Vj
implies the other way. In fact, this theorem is true by merely looking at (2.2).
The following theorem shows that the pivoting process (2.2) with the pivoting
strategy (2.4) leads to the orthogonal decomposition of the linear subspace generated
by the columns of Vj with respect to vector u.
Theorem 3.2 (orthogonal decomposition with respect to a given vector). As-
sume now a vector uj = 0 and let tjk = uTj vkj , k = 1, . . . , n. If tjj = 0, then
uT Vj+1 = uT Vj M−1 T −1 T
j = tj Mj = ej .
∀r ≤ j ∀j.
and
q
{v ∈ L(V1 )|uT1 v = 0, . . . , uTq v = 0} = L vq+1 , . . . , vnq .
In addition, we have
Table 4.1
Iterations for obtaining the orthogonal decomposition of L(V1 ) with respect to L(U). Pivot
columns are boldfaced.
Downloaded 04/23/13 to 193.144.185.29. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
Iteration 1 Iteration 2
1 1 0 0 0 0 3 1 1 –1 0 0
–1 0 1 0 0 0 –3 0 1 0 0 0
1 0 0 1 0 0 0 0 0 1 0 0
0 0 0 0 1 0 1 0 0 0 1 0
0 0 0 0 0 1 0 0 0 0 0 1
1 –1 1 0 0 3 0 –3 1 0
Step 4: For j = ℓ+1 to s locate the pivot column rℓ as the first column not orthogonal
to ui , that is, tℓrℓ = 0. If there is no such a column go to Step 7. Otherwise,
continue with Step 5.
Step 5: Increase ℓ in one unit, divide the rℓ column by tℓrℓ , and if rℓ = ℓ, switch
columns ℓ and rℓ and associated dot products tℓrℓ and tℓℓ .
Step 6: For j = 1 to s and j = rℓ do the following: If tℓj = 0, do wkj = wkj − tℓj wki
for k = 1, . . . , n.
Step 7: If i = m, go to Step 8. Otherwise, increase i in one unit and go to Step 3.
Step 8: Return L(W2 ) = L (wℓ , . . . , ws ) as the orthogonal subspace of L(U) in
L(V1 ) and L(W1 ) = L (w1 , . . . , wℓ−1 ) as its complement.
Remark 4. If the pivoting process were used taking into account numerical consid-
erations, Step 4 should be adequately modified by the corresponding pivot selecting
strategy (maximum pivot strategy, for example). In this case, the corresponding per-
mutation in Step 8 is required. Note that in this paper only algebraic considerations
are used.
The process described in Algorithm 1 can be organized in a tabular form. A
detailed description is given in the following example.
Example 1 (orthogonal decomposition). Consider the linear subspace of L(V1 ) =
5
R :
L(U) = L (1, −1, 1, 0, 0)T , (3, −3, 0, 1, 0)T , (0, 0, −1, 0, 1)T .
Finally, it is necessary to perform the pivoting process and to update the first
column and the last row of the table with the next generator of L(U) and the new
Downloaded 04/23/13 to 193.144.185.29. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
inner products. Then, we get the second table (see Iteration 2 in Table 4.1). In order
to select the pivot column, we have to look for the first nonnull element in the last
row starting with its second element because we are in the second iteration. Then,
the selected column is the third one, and before performing the pivoting process,
interchange of second and third columns must be done.
We repeat the pivoting process, incorporate the last generators of L(U), and
obtain the new dot products. We select the pivot column, starting at column three,
and look for a nonnull dot product, obtaining the fourth column as the pivot. Next,
we repeat the normalization and pivoting processes and, finally, we get the Output
tableau in Table 4.1, where the first three vectors are the generators of the complement
subspace and the last two are the generators of the orthogonal subspace. Italicized
columns are used in all iterations to refer to the complementary subspace.
Thus, the orthogonal decomposition becomes
Note that, from the Output tableau, we can obtain the linear subspace orthogonal
to the linear subspace generated by any subset of the initial set of vectors. For
example, the orthogonal complement of the linear subspace generated by the set
{(1, −1, 1, 0, 0)T , (3, −3, 0, 1, 0)T } is (see Output in Table 4.1)
L({(1, −1, 1, 0, 0)T,(3, −3, 0, 1, 0)T })⊥ = L{(1, 0, −1, −3, 0)T,(1, 1, 0, 0, 0)T,(−1, 0, 1, 3, 1)T },
L({(1, −1, 1, 0, 0)T , (3, −3, 0, 1, 0)T })⊥ = L{(1, 1, 0, 0, 0), (−1/3, 0, 1/3, 1, 0), (0, 0, 0, 0, 1)}.
Similarly,
L({(0, 0, −1, 0, 1)T })⊥ = L{(1, 0, 0, −3, 0)T ,(0, 0, 0, 1, 0)T ,(1, 1, 0, 0, 0)T ,(−1, 0, 1, 3, 1)T }.
are in the last tableau Vn+1 is the inverse of matrix A. In addition, if we start with
V1 being the identity matrix, in the process we obtain the inverses of all block main
Downloaded 04/23/13 to 193.144.185.29. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
diagonal matrices.
Proof. Matrices Vj for j = 2, . . . , n + 1 are obtained, using the transformations
This proves that A−1 = Vn ; that is, the inverse of A is the matrix whose columns
are in the final tableau obtained using Algorithm 1.
The second part of the theorem is obvious because the lower triangular part of
the identity matrix is null and does not affect the dot products and the pivoting
transformations involved in the process.
Example 2 (matrix inverses). Consider the following matrix A, where the block
main diagonal matrices are shown, and its inverse A−1 :
1 1 0 1 0
2/7 −5/7 −5/7 1/7 3/7
−1 1 −1 0 0 3/7 3/7 3/7 −2/7 1/7
; A−1 =
A= 0 0 1 0 1 1/7 1/7 8/7 −3/7 −2/7 .
0 0 0 1 2
2/7 2/7 2/7 1/7 −4/7
0 1 0 −1 1 −1/7 −1/7 −1/7 3/7 2/7
(5.3)
Table 5.1 shows the iterations for inverting A using Algorithm 1. The inverse
matrix A−1 is obtained in the last iteration (see Table 5.1). In addition, Table 5.1
also contains the inverses of the block main diagonal matrices indicated below (see
the marked matrices in Iterations 2 to 5 in Table 5.1). The important result is that
this is obtained with no extra computation.
Finally, we mention that the 5 × 5 matrices we obtain in Iterations 2 to 5 in Table
5.1 are the inverses of the matrices that result from replacing in the unit matrix its
rows by the rows of matrix A. For example, the matrix in Iteration 4 is such that
1 1 0 1 0 1/2 −1/2 −1/2 −1/2 1/2
−1 1 −1 0 0 1/2 1/2 1/2 −1/2 −1/2
; H−1 = 0
(5.4) H = 0 0 1 0 1 0 1 0 −1 .
0 0 0 1 0 0 0 0 1 0
0 0 0 0 1 0 0 0 0 1
1 0 1 1 0
2 1 0 0 0
(5.5) B = −1 −1 1 0 −1 ,
0 1 1 2 2
0 2 1 0 1
Iteration 1 Iteration 2
1 1 0 0 0 0 –1 1 –1 0 –1 0
1 0 1 0 0 0 1 0 1 0 0 0
0 0 0 1 0 0 –1 0 0 1 0 0
1 0 0 0 1 0 0 0 0 0 1 0
0 0 0 0 0 1 0 0 0 0 0 1
1 1 0 1 0 –1 2 –1 1 0
Iteration 3 Iteration 4
0 1/2 –1/2 –1/2 –1/2 0 0 1/2 –1/2 –1/2 –1/2 1/2
0 1/2 1/2 1/2 –1/2 0 0 1/2 1/2 1/2 –1/2 –1/2
1 0 0 1 0 0 0 0 0 1 0 –1
0 0 0 0 1 0 1 0 0 0 1 0
1 0 0 0 0 1 2 0 0 0 0 1
0 0 1 0 1 0 0 0 1 2
Iteration 5 Output
0 1/2 –1/2 –1/2 –1/2 3/2 2/7 –5/7 –5/7 1/7 3/7
1 1/2 1/2 1/2 –1/2 1/2 3/7 3/7 3/7 –2/7 1/7
0 0 0 1 0 –1 1/7 1/7 8/7 –3/7 –2/7
–1 0 0 0 1 –2 2/7 2/7 2/7 1/7 –4/7
1 0 0 0 0 1 –1/7 –1/7 –1/7 3/7 2/7
1/2 1/2 1/2 –3/2 7/2
5.3. Determining the rank of a matrix. In this section we see that Algorithm
1 also allows one to determine the rank of a matrix.
674 CASTILLO, COBO, JUBETE, PRUNEDA, AND CASTILLO
Table 5.2
Iterations for inverting the matrix in Example 2 when we start with matrix A in (5.5). Pivot
columns are boldfaced.
Downloaded 04/23/13 to 193.144.185.29. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
Iteration 1 Iteration 2
1 1 0 1 1 0 –1 1/3 –2/3 1/3 0 –2/3
1 2 1 0 0 0 1 2/3 –1/3 –4/3 –2 –4/3
0 –1 –1 1 0 –1 –1 –1/3 –1/3 5/3 1 –1/3
1 0 1 1 2 2 0 0 1 1 2 2
0 0 2 1 0 1 0 0 2 1 0 1
3 2 2 3 2 2/3 2/3 –10/3 –3 –1/3
Iteration 3 Iteration 4
0 1 –1 –3 –3 –1 0 5/11 –7/22 –3/11 –15/22 –13/22
0 1 –1/2 –3 –7/2 –3/2 0 5/11 2/11 –3/11 –13/11 –12/11
1 0 –1/2 0 –1/2 –1/2 0 0 –1/2 0 –1/2 –1/2
0 –1 3/2 6 13/2 5/2 1 1/11 3/22 6/11 41/22 37/22
1 –2 3 11 9 2 2 0 1/2 1 1/2 1/2
–2 5/2 11 17/2 3/2 1/11 25/22 28/11 63/22 59/22
Iteration 5 Output
0 10/21 –1/21 1/3 –5/21 1/21 2/7 –5/7 -5/7 1/7 3/7
1 31/63 41/63 7/9 –26/63 1/63 3/7 3/7 3/7 -2/7 1/7
0 1/63 –19/63 4/9 –11/63 –2/63 1/7 1/7 8/7 –3/7 –2/7
–1 2/63 –38/63 –10/9 41/63 –4/63 2/7 2/7 2/7 1/7 –4/7
1 –1/63 19/63 5/9 11/63 2/63 –1/7 –1/7 –1/7 3/7 2/7
4/9 14/9 22/9 –8/9 1/9
value of the matrix, and the normalization step, which divides its determinant by tℓrℓ
(see (2.1)). In addition, we multiply it by −1 each time we switch columns. Since
|A−1 | = |A|−1 , we have
n
(5.6) |A| = (−1)p tiri .
i=1
If we start with an identity matrix, the lower triangular part of the identity matrix
is null and does not affect the dot products and the pivoting transformations involved
in the process. Thus, the result holds.
Example 5 (determinant of a matrix). The determinant of the matrix in Example
2 is obtained by multiplying the normalizing constants, that is, the last values in the
boldfaced columns in Table 5.1. Thus, we have
1 × 2 × 1 × 1 × 7/2 = 7.
The determinants of the block main diagonal matrices in (5.3) are 1, 2, 2, 2, and 7,
respectively.
Remark 5. If instead of starting with the identity matrix In , we start with a
nonsingular matrix B with determinant |B|, expression (5.6) becomes
n
(5.7) |A| = |B|−1 (−1)p tiri .
i=1
Table 5.4
Pivoting process to determine whether or not a set of vectors is linearly dependent.
Downloaded 04/23/13 to 193.144.185.29. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
{(1, 0, 1, 1), (2, −1, −1, 0), (1, 1, 0, −1), (−1, 1, 2, 1)}.
If we use the pivoting process (see Table 5.4), we have no problem finding a pivot
column for the first three vectors, but there is no pivot column for the fourth vector.
This means that the fourth vector is a linear combination of the first three.
5.7. Obtaining the intersection of two linear subspaces. Theorem 3.4
allows us to obtain the intersection of two linear subspaces S1 and S2 by noting that
In fact, we can obtain first S2⊥ , the orthogonal to S2 , by letting L(V1 ) = Rn in The-
orem 3.4 and then find the orthogonal to S2⊥ in S1 , using S1 as L(V1 ). Alternatively,
we can obtain first S1⊥ , the orthogonal to S1 , by letting L(V1 ) = Rn in Theorem 3.4
and then find the orthogonal to S1⊥ in S2 , using S2 as L(V1 ).
ORTHOGONALLY BASED PIVOTING TRANSFORMATION 677
Table 5.5
Pivoting transformations corresponding to Example 9.
Downloaded 04/23/13 to 193.144.185.29. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
Then, obtaining the solution to system (5.11) reduces to determining the orthog-
onal complement of the linear subspace generated by the rows of matrix A.
Example 9 (a homogeneous system of linear equations). Consider the system of
equations
To solve this system, we obtain the orthogonal complement of the linear subspace
generated by the rows of the system matrix, as shown in Table 5.5. Thus, the solution
is
Table 5.6
New pivoting transformation after adding (5.21) and after removing variable x4 in system (5.19).
Downloaded 04/23/13 to 193.144.185.29. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
of the system matrix A. Thus, the compatibility problem reduces to that of sec-
tion 5.6.
Thus, analyzing the compatibility of the system of equations (5.15) reduces to
finding the orthogonal complement L {w1 , . . . , wp } of L {a1 , . . . , an } and checking
whether or not bWT = 0.
The computational process arising from this procedure has a complexity which
coincides exactly with that for the Gauss elimination procedure. However, it has one
important advantage: W is independent of b and so we can analyze the compatibility
of any symbolic vector un+1 without extra computations.
Example 11 (compatibility of a linear system of equations). Suppose that we are
interested in determining the conditions under which the system of equations
2x1 − x2 + x3 = a,
(5.25) x1 − x3 = 3a,
x2 − 3x3 = b
REFERENCES