add wiki
This commit is contained in:
@@ -0,0 +1,549 @@
|
||||
<!-- source-page: 41 -->
|
||||
|
||||
Therefore, the products AB and BA are not the same, and it follows that matrix multiplication is not commutative. Indeed, depending on the orders of A and B, the orders of the two product matrices AB and BA can be different, and the product AB may be defined, whereas the product BA may not be calculable.
|
||||
|
||||
To distinguish the order of multiplication of matrices, we say that in the product AB, the matrix A premultiplies B, or the matrix B postmultiplies A. Although AB ≠ BA in general, it may happen that AB = BA for special A and B, in which case we say that A and B commute.
|
||||
|
||||
Although the commutative law does not hold in matrix multiplication, the distributive law and associative law are both valid. The distributive law states that
|
||||
|
||||
$$
|
||||
\mathbf {E} = (\mathbf {A} + \mathbf {B}) \mathbf {C} = \mathbf {A C} + \mathbf {B C} \tag {2.14}
|
||||
$$
|
||||
|
||||
In other words, we may first add A and B and then multiply by C, or we may first multiply A and B by C and then do the addition. Note that considering the number of operations, the evaluation of E by adding A and B first is much more economical, which is important to remember in the design of an analysis program.
|
||||
|
||||
The distributive law is proved using (2.11); that is, using
|
||||
|
||||
$$
|
||||
e _ {i j} = \sum_ {r = 1} ^ {m} (a _ {i r} + b _ {i r}) c _ {r j} \tag {2.15}
|
||||
$$
|
||||
|
||||
we obtain $e_{ij} = \sum_{r=1}^{m} a_{ir} c_{rj} + \sum_{r=1}^{m} b_{ir} c_{rj}$ (2.16)
|
||||
|
||||
The associative law states that
|
||||
|
||||
$$
|
||||
\mathbf {G} = (\mathbf {A B}) \mathbf {C} = \mathbf {A} (\mathbf {B C}) = \mathbf {A B C} \tag {2.17}
|
||||
$$
|
||||
|
||||
in other words, that the order of multiplication is immaterial. The proof is carried out by using the definition of matrix multiplication in $(2.11)$ and calculating in either way a general element of G.
|
||||
|
||||
Since the associative law holds, in practice, a string of matrix multiplications can be carried out in an arbitrary sequence, and by a clever choice of the sequence, many operations can frequently be saved. The only point that must be remembered when manipulating the matrices is that brackets can be removed or inserted and that powers can be combined, but that the order of multiplication must be preserved.
|
||||
|
||||
Consider the following examples to demonstrate the use of the associative and distributive laws in order to simplify a string of matrix multiplications.
|
||||
|
||||
EXAMPLE 2.6: Calculate $\mathbf{A}^4$ , where
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{l l} 2 & 1 \\ 1 & 3 \end{array} \right]
|
||||
$$
|
||||
|
||||
One way of evaluating $A^{4}$ is to simply calculate
|
||||
|
||||
$$
|
||||
\mathbf {A} ^ {2} = \left[ \begin{array}{l l} 2 & 1 \\ 1 & 3 \end{array} \right] \left[ \begin{array}{l l} 2 & 1 \\ 1 & 3 \end{array} \right] = \left[ \begin{array}{l l} 5 & 5 \\ 5 & 1 0 \end{array} \right]
|
||||
$$
|
||||
|
||||
Hence $\mathbf{A}^3 = \mathbf{A}^2\mathbf{A} = \begin{bmatrix} 5 & 5 \\ 5 & 10 \end{bmatrix} \begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix} = \begin{bmatrix} 15 & 20 \\ 20 & 35 \end{bmatrix}$
|
||||
|
||||
<!-- source-page: 42 -->
|
||||
|
||||
and $\mathbf{A}^4 = \mathbf{A}^3\mathbf{A} = \begin{bmatrix} 15 & 20 \\ 20 & 35 \end{bmatrix} \begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix} = \begin{bmatrix} 50 & 75 \\ 75 & 125 \end{bmatrix}$
|
||||
|
||||
Alternatively, we may use
|
||||
|
||||
$$
|
||||
\mathbf {A} ^ {4} = \mathbf {A} ^ {2} \mathbf {A} ^ {2} = \left[ \begin{array}{l l} 5 & 5 \\ 5 & 1 0 \end{array} \right] \left[ \begin{array}{l l} 5 & 5 \\ 5 & 1 0 \end{array} \right] = \left[ \begin{array}{l l} 5 0 & 7 5 \\ 7 5 & 1 2 5 \end{array} \right]
|
||||
$$
|
||||
|
||||
and save one matrix multiplication.
|
||||
|
||||
EXAMPLE 2.7: Evaluate the product $v^{T}Av$ , where
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{l l l} 3 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 6 \end{array} \right]; \quad \mathbf {v} = \left[ \begin{array}{c} 1 \\ 2 \\ - 1 \end{array} \right]
|
||||
$$
|
||||
|
||||
The formal procedure would be to calculate $\mathbf{x} = \mathbf{A}\mathbf{v}$ ; i.e.,
|
||||
|
||||
$$
|
||||
\mathbf {x} = \mathbf {A} \mathbf {v} = \left[ \begin{array}{l l l} 3 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 6 \end{array} \right] \left[ \begin{array}{l} 1 \\ 2 \\ - 1 \end{array} \right] = \left[ \begin{array}{l} 6 \\ 8 \\ - 1 \end{array} \right]
|
||||
$$
|
||||
|
||||
and then calculate $\mathbf{v}^T\mathbf{x}$ to obtain
|
||||
|
||||
$$
|
||||
\mathbf {v} ^ {T} \mathbf {A} \mathbf {v} = \left[ \begin{array}{l l l} 1 & 2 & - 1 \end{array} \right] \left[ \begin{array}{c} 6 \\ 8 \\ - 1 \end{array} \right] = 2 3
|
||||
$$
|
||||
|
||||
However, it is more effective to calculate the required product in the following way. First, we write
|
||||
|
||||
$$
|
||||
\mathbf {A} = \mathbf {U} + \mathbf {D} + \mathbf {U} ^ {T}
|
||||
$$
|
||||
|
||||
where $\mathbf{U}$ is a lower triangular matrix and $\mathbf{D}$ is a diagonal matrix,
|
||||
|
||||
$$
|
||||
\mathbf {U} = \left[ \begin{array}{l l l} 0 & 0 & 0 \\ 2 & 0 & 0 \\ 1 & 2 & 0 \end{array} \right]; \quad \mathbf {D} = \left[ \begin{array}{l l l} 3 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 6 \end{array} \right]
|
||||
$$
|
||||
|
||||
Hence we have $\mathbf{v}^T\mathbf{A}\mathbf{v} = \mathbf{v}^T (\mathbf{U} + \mathbf{D} + \mathbf{U}^T)\mathbf{v}$
|
||||
|
||||
$$
|
||||
\mathbf {v} ^ {T} \mathbf {A} \mathbf {v} = \mathbf {v} ^ {T} \mathbf {U} \mathbf {v} + \mathbf {v} ^ {T} \mathbf {D} \mathbf {v} + \mathbf {v} ^ {T} \mathbf {U} ^ {T} \mathbf {v}
|
||||
$$
|
||||
|
||||
However, $\mathbf{v}^T\mathbf{U}\mathbf{v}$ is a single number and hence $\mathbf{v}^T\mathbf{U}^T\mathbf{v} = \mathbf{v}^T\mathbf{U}\mathbf{v}$ , and it follows that
|
||||
|
||||
$$
|
||||
\mathbf {v} ^ {T} \mathbf {A} \mathbf {v} = 2 \mathbf {v} ^ {T} \mathbf {U} \mathbf {v} + \mathbf {v} ^ {T} \mathbf {D} \mathbf {v} \tag {a}
|
||||
$$
|
||||
|
||||
The higher efficiency in the matrix multiplication is obtained by taking advantage of the fact that $\mathbf{U}$ is a lower triangular and $\mathbf{D}$ is a diagonal matrix. Let $\mathbf{x} = \mathbf{U}\mathbf{v}$ ; then we have
|
||||
|
||||
$$
|
||||
\begin{array}{l} x _ {1} = 0 \\ x _ {2} = (2) (1) = 2 \\ x _ {3} = (1) (1) + (2) (2) = 5 \\ \end{array}
|
||||
$$
|
||||
|
||||
<!-- source-page: 43 -->
|
||||
|
||||
Hence
|
||||
|
||||
$$
|
||||
\mathbf {x} = \left[ \begin{array}{l} 0 \\ 2 \\ 5 \end{array} \right]
|
||||
$$
|
||||
|
||||
Next, we obtain
|
||||
|
||||
$$
|
||||
\mathbf {v} ^ {T} \mathbf {U} \mathbf {v} = \mathbf {v} ^ {T} \mathbf {x} = (2) (2) + (- 1) (5) = - 1
|
||||
$$
|
||||
|
||||
Also $\mathbf{v}^T\mathbf{D}\mathbf{v} = (1)(1)(3) + (2)(2)(4) + (-1)(-1)(6)$
|
||||
|
||||
$$
|
||||
= 2 5
|
||||
$$
|
||||
|
||||
Hence using (a) we have $\mathbf{v}^T\mathbf{A}\mathbf{v} = 23$ , as before.
|
||||
|
||||
Apart from the commutative law, which in general does not hold in matrix multiplications, the cancellation of matrices in matrix equations also cannot be performed, in general, as the cancellation of ordinary numbers. In particular, if AB = CB, it does not necessarily follow that A = C. This is easily demonstrated considering a specific case:
|
||||
|
||||
$$
|
||||
\left[ \begin{array}{l l} 2 & 1 \\ 4 & 0 \end{array} \right] \left[ \begin{array}{l} 1 \\ 2 \end{array} \right] = \left[ \begin{array}{l l} 4 & 0 \\ 0 & 2 \end{array} \right] \left[ \begin{array}{l} 1 \\ 2 \end{array} \right] \tag {2.18}
|
||||
$$
|
||||
|
||||
but
|
||||
|
||||
$$
|
||||
\left[ \begin{array}{l l} 2 & 1 \\ 4 & 0 \end{array} \right] \neq \left[ \begin{array}{l l} 4 & 0 \\ 0 & 2 \end{array} \right] \tag {2.19}
|
||||
$$
|
||||
|
||||
However, it must be noted that $\mathbf{A} = \mathbf{C}$ if the equation $\mathbf{AB} = \mathbf{CB}$ holds for all possible $\mathbf{B}$ . Namely, in that case, we simply select $\mathbf{B}$ to be the identity matrix $\mathbf{I}$ , and hence $\mathbf{A} = \mathbf{C}$ .
|
||||
|
||||
It should also be noted that included in this observation is the fact that if AB = 0, it does not follow that either A or B is a null matrix. A specific case demonstrates this observation:
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{l l} 1 & 0 \\ 2 & 0 \end{array} \right]; \quad \mathbf {B} = \left[ \begin{array}{l l} 0 & 0 \\ 3 & 4 \end{array} \right]; \quad \mathbf {A B} = \left[ \begin{array}{l l} 0 & 0 \\ 0 & 0 \end{array} \right] \tag {2.20}
|
||||
$$
|
||||
|
||||
Some special rules concerning the use of transposed matrices in matrix multiplications need to be pointed out. It is noted that the transpose of the product of two matrices A and B is equal to the product of the transposed matrices in reverse order; i.e.,
|
||||
|
||||
$$
|
||||
(\mathbf {A} \mathbf {B}) ^ {T} = \mathbf {B} ^ {T} \mathbf {A} ^ {T} \tag {2.21}
|
||||
$$
|
||||
|
||||
The proof that (2.21) does hold is obtained using the definition for the evaluation of a matrix product given in (2.11).
|
||||
|
||||
Considering the matrix products in (2.21), it should be noted that although A and B may be symmetric, AB is, in general, not symmetric. However, if A is symmetric, the matrix $B^{T}AB$ is always symmetric. The proof follows using (2.21):
|
||||
|
||||
$$
|
||||
(\mathbf {B} ^ {T} \mathbf {A} \mathbf {B}) ^ {T} = (\mathbf {A} \mathbf {B}) ^ {T} (\mathbf {B} ^ {T}) ^ {T} \tag {2.22}
|
||||
$$
|
||||
|
||||
$$
|
||||
= \mathbf {B} ^ {T} \mathbf {A} ^ {T} \mathbf {B} \tag {2.23}
|
||||
$$
|
||||
|
||||
But, because $\mathbf{A}^T = \mathbf{A}$ , we have
|
||||
|
||||
$$
|
||||
(\mathbf {B} ^ {T} \mathbf {A} \mathbf {B}) ^ {T} = \mathbf {B} ^ {T} \mathbf {A} \mathbf {B} \tag {2.24}
|
||||
$$
|
||||
|
||||
and hence $\mathbf{B}^T\mathbf{A}\mathbf{B}$ is symmetric.
|
||||
|
||||
<!-- source-page: 44 -->
|
||||
|
||||
# The Inverse Matrix
|
||||
|
||||
We have seen that matrix addition and subtraction are carried out using essentially the same laws as those used in the manipulation of ordinary numbers. However, matrix multiplication is quite different, and we have to get used to special rules. With regard to matrix division, it strictly does not exist. Instead, an inverse matrix is defined. We shall define and use the inverse of square matrices only.
|
||||
|
||||
Definition: The inverse of a matrix A is denoted by $A^{-1}$ . Assume that the inverse exists; then the elements of $A^{-1}$ are such that $A^{-1}A = I$ and $AA^{-1} = I$ . A matrix that possesses an inverse is said to be nonsingular. A matrix without an inverse is a singular matrix.
|
||||
|
||||
As mentioned previously, the inverse of a matrix does not need to exist. A trivial example is the null matrix. Assume that the inverse of A exists. Then we still want to show that either of the conditions $A^{-1}A = I$ or $AA^{-1} = I$ implies the other. Assume that we have evaluated the elements of the matrices $A_{l}^{-1}$ and $A_{r}^{-1}$ such that $A_{l}^{-1}A = I$ and $AA_{r}^{-1} = I$ . Then we have
|
||||
|
||||
$$
|
||||
\mathbf {A} _ {l} ^ {- 1} = \mathbf {A} _ {l} ^ {- 1} (\mathbf {A} \mathbf {A} _ {r} ^ {- 1}) = (\mathbf {A} _ {l} ^ {- 1} \mathbf {A}) \mathbf {A} _ {r} ^ {- 1} = \mathbf {A} _ {r} ^ {- 1} \tag {2.25}
|
||||
$$
|
||||
|
||||
and hence $\mathbf{A}_l^{-1} = \mathbf{A}_r^{-1}$ .
|
||||
|
||||
EXAMPLE 2.8: Evaluate the inverse of the matrix A, where
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{c c} 2 & - 1 \\ - 1 & 3 \end{array} \right]
|
||||
$$
|
||||
|
||||
For the inverse of $\mathbf{A}$ we need $\mathbf{AA}^{-1} = \mathbf{I}$ . By trial and error (or otherwise) we find that
|
||||
|
||||
$$
|
||||
\mathbf {A} ^ {- 1} = \left[ \begin{array}{l l} \frac {3}{5} & \frac {1}{5} \\ \frac {1}{5} & \frac {2}{5} \end{array} \right]
|
||||
$$
|
||||
|
||||
We check that $\mathbf{A}\mathbf{A}^{-1} = \mathbf{I}$ and $\mathbf{A}^{-1}\mathbf{A} = \mathbf{I}$ :
|
||||
|
||||
$$
|
||||
\mathbf {A} \mathbf {A} ^ {- 1} = \left[ \begin{array}{c c} 2 & - 1 \\ - 1 & 3 \end{array} \right] \left[ \begin{array}{l l} \frac {3}{5} & \frac {1}{5} \\ \frac {1}{5} & \frac {2}{5} \end{array} \right] = \left[ \begin{array}{l l} 1 & 0 \\ 0 & 1 \end{array} \right]
|
||||
$$
|
||||
|
||||
$$
|
||||
\mathbf {A} ^ {- 1} \mathbf {A} = \left[ \begin{array}{l l} \frac {3}{5} & \frac {1}{5} \\ \frac {1}{5} & \frac {2}{5} \end{array} \right] \left[ \begin{array}{c c} 2 & - 1 \\ - 1 & 3 \end{array} \right] = \left[ \begin{array}{l l} 1 & 0 \\ 0 & 1 \end{array} \right]
|
||||
$$
|
||||
|
||||
To calculate the inverse of a product AB, we proceed as follows. Let $\mathbf{G} = (\mathbf{AB})^{-1}$ , where A and B are both square matrices. Then
|
||||
|
||||
$$
|
||||
\mathbf {G A B} = \mathbf {I} \tag {2.26}
|
||||
$$
|
||||
|
||||
and postmultiplying by $B^{-1}$ and $A^{-1}$ , we obtain
|
||||
|
||||
$$
|
||||
\mathbf {G} \mathbf {A} = \mathbf {B} ^ {- 1} \tag {2.27}
|
||||
$$
|
||||
|
||||
$$
|
||||
\mathbf {G} = \mathbf {B} ^ {- 1} \mathbf {A} ^ {- 1} \tag {2.28}
|
||||
$$
|
||||
|
||||
Therefore, $(\mathbf{AB})^{-1} = \mathbf{B}^{-1}\mathbf{A}^{-1}$ (2.29)
|
||||
|
||||
We note that the same law of matrix reversal was shown to apply when the transpose of a matrix product is calculated.
|
||||
|
||||
<!-- source-page: 45 -->
|
||||
|
||||
EXAMPLE 2.9: For the matrices A and B given, check that $(\mathbf{AB})^{-1} = \mathbf{B}^{-1}\mathbf{A}^{-1}$ .
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{c c} 2 & - 1 \\ - 1 & 3 \end{array} \right]; \quad \mathbf {B} = \left[ \begin{array}{c c} 3 & 0 \\ 0 & 4 \end{array} \right]
|
||||
$$
|
||||
|
||||
The inverse of $\mathbf{A}$ was used in Example 2.8. The inverse of $\mathbf{B}$ is easy to obtain:
|
||||
|
||||
$$
|
||||
\mathbf {B} ^ {- 1} = \left[ \begin{array}{l l} \frac {1}{3} & 0 \\ 0 & \frac {1}{4} \end{array} \right]
|
||||
$$
|
||||
|
||||
To check that $(\mathbf{AB})^{-1} = \mathbf{B}^{-1}\mathbf{A}^{-1}$ , we need to evaluate $\mathbf{C} = \mathbf{AB}$ :
|
||||
|
||||
$$
|
||||
\mathbf {C} = \left[ \begin{array}{c c} 2 & - 1 \\ - 1 & 3 \end{array} \right] \left[ \begin{array}{l l} 3 & 0 \\ 0 & 4 \end{array} \right] = \left[ \begin{array}{c c} 6 & - 4 \\ - 3 & 1 2 \end{array} \right]
|
||||
$$
|
||||
|
||||
Assume that $\mathbf{C}^{-1} = \mathbf{B}^{-1}\mathbf{A}^{-1}$ . Then we would have
|
||||
|
||||
$$
|
||||
\mathbf {C} ^ {- 1} = \left[ \begin{array}{l l} \frac {1}{3} & 0 \\ 0 & \frac {1}{4} \end{array} \right] \left[ \begin{array}{l l} \frac {3}{5} & \frac {1}{5} \\ \frac {1}{5} & \frac {2}{5} \end{array} \right] = \left[ \begin{array}{l l} \frac {1}{5} & \frac {1}{1 5} \\ \frac {1}{2 0} & \frac {1}{1 0} \end{array} \right] \tag {a}
|
||||
$$
|
||||
|
||||
To check that the matrix given in (a) is indeed the inverse of $\mathbf{C}$ , we evaluate $\mathbf{C}^{-1}\mathbf{C}$ and find that
|
||||
|
||||
$$
|
||||
\mathbf {C} ^ {- 1} \mathbf {C} = \left[ \begin{array}{l l} \frac {1}{5} & \frac {1}{1 5} \\ \frac {1}{2 0} & \frac {1}{1 0} \end{array} \right] \left[ \begin{array}{c c} 6 & - 4 \\ - 3 & 1 2 \end{array} \right] = \mathbf {I}
|
||||
$$
|
||||
|
||||
But since $\mathbf{C}^{-1}$ is unique and only the correct $\mathbf{C}^{-1}$ satisfies the relation $\mathbf{C}^{-1}\mathbf{C} = \mathbf{I}$ , we indeed have found in (a) the inverse of $\mathbf{C}$ , and the relation $(\mathbf{AB})^{-1} = \mathbf{B}^{-1}\mathbf{A}^{-1}$ is satisfied.
|
||||
|
||||
In Examples 2.8 and 2.9, the inverse of A and B could be found by trial and error. However, to obtain the inverse of a general matrix, we need to have a general algorithm. One way of calculating the inverse of a matrix A of order n is to solve the n systems of equations
|
||||
|
||||
$$
|
||||
\mathbf {A} \mathbf {X} = \mathbf {I} \tag {2.30}
|
||||
$$
|
||||
|
||||
where I is the identity matrix of order n and we have $X = A^{-1}$ . For the solution of each system of equations in (2.30), we can use the algorithms presented in Section 8.2.
|
||||
|
||||
These considerations show that a system of equations could be solved by calculating the inverse of the coefficient matrix; i.e., if we have
|
||||
|
||||
$$
|
||||
\mathbf {A} \mathbf {y} = \mathbf {c} \tag {2.31}
|
||||
$$
|
||||
|
||||
where $\mathbf{A}$ is of order $n \times n$ and $\mathbf{y}$ and $\mathbf{c}$ are of order $n \times 1$ , then
|
||||
|
||||
$$
|
||||
\mathbf {y} = \mathbf {A} ^ {- 1} \mathbf {c} \tag {2.32}
|
||||
$$
|
||||
|
||||
However, the inversion of A is very costly, and it is much more effective to only solve the equations in (2.31) without inverting A (see Chapter 8). Indeed, although we may write symbolically that $y = A^{-1}c$ , to evaluate y we actually only solve the equations.
|
||||
|
||||
# Partitioning of Matrices
|
||||
|
||||
To facilitate matrix manipulations and to take advantage of the special form of matrices, it may be useful to partition a matrix into submatrices. A submatrix is a matrix that is obtained from the original matrix by including only the elements of certain rows and columns. The
|
||||
|
||||
<!-- source-page: 46 -->
|
||||
|
||||
idea is demonstrated using a specific case in which the dashed lines are the lines of partitioning:
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{c c c c c c} a _ {1 1} & a _ {1 2} & a _ {1 3} & a _ {1 4} & a _ {1 5} & a _ {1 6} \\ a _ {2 1} & a _ {2 2} & a _ {2 3} & a _ {2 4} & a _ {2 5} & a _ {2 6} \\ \hdashline a _ {3 1} & a _ {3 2} & a _ {3 3} & a _ {3 4} & a _ {3 5} & a _ {3 6} \end{array} \right] \tag {2.33}
|
||||
$$
|
||||
|
||||
It should be noted that each of the partitioning lines must run completely across the original matrix. Using the partitioning, matrix A is written as
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{l l l} \mathbf {A} _ {1 1} & \mathbf {A} _ {1 2} & \mathbf {A} _ {1 3} \\ \mathbf {A} _ {2 1} & \mathbf {A} _ {2 2} & \mathbf {A} _ {2 3} \end{array} \right] \tag {2.34}
|
||||
$$
|
||||
|
||||
where $\mathbf{A}_{11} = \begin{bmatrix} a_{11}\\ a_{21} \end{bmatrix};\qquad \mathbf{A}_{12} = \begin{bmatrix} a_{12} & a_{13} & a_{14}\\ a_{22} & a_{23} & a_{24} \end{bmatrix};\qquad \text{etc.} \tag{2.35}$
|
||||
|
||||
The right-hand side of $(2.34)$ could again be partitioned, such as
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{l l l} \mathbf {A} _ {1 1} & \mathbf {A} _ {1 2} & \mathbf {A} _ {1 3} \\ \mathbf {A} _ {2 1} & \mathbf {A} _ {2 2} & \mathbf {A} _ {2 3} \end{array} \right] \tag {2.36}
|
||||
$$
|
||||
|
||||
and we may write A as
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{l l} \bar {\mathbf {A}} _ {1} & \bar {\mathbf {A}} _ {2} \end{array} \right]; \quad \bar {\mathbf {A}} _ {1} = \left[ \begin{array}{l} \mathbf {A} _ {1 1} \\ \mathbf {A} _ {2 1} \end{array} \right]; \quad \bar {\mathbf {A}} _ {2} = \left[ \begin{array}{l l} \mathbf {A} _ {1 2} & \mathbf {A} _ {1 3} \\ \mathbf {A} _ {2 2} & \mathbf {A} _ {2 3} \end{array} \right] \tag {2.37}
|
||||
$$
|
||||
|
||||
The partitioning of matrices can be of advantage in saving computer storage; namely, if submatrices repeat, it is necessary to store the submatrix only once. The same applies in arithmetic. Using submatrices, we may identify a typical operation that is repeated many times. We then carry out this operation only once and use the result whenever it is needed.
|
||||
|
||||
The rules to be used in calculations with partitioned matrices follow from the definition of matrix addition, subtraction, and multiplication. Using partitioned matrices we can add, subtract, or multiply as if the submatrices were ordinary matrix elements, provided the original matrices have been partitioned in such a way that it is permissible to perform the individual submatrix additions, subtractions, or multiplications.
|
||||
|
||||
These rules are easily justified and remembered if we keep in mind that the partitioning of the original matrices is only a device to facilitate matrix manipulations and does not change any results.
|
||||
|
||||
EXAMPLE 2.10: Evaluate the matrix product C = AB in Example 2.4 by using the following partitioning:
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{c c c c} 5 & 3 & 1 \\ 4 & 6 & 2 \\ 1 0 & 3 & 4 \end{array} \right]; \quad \mathbf {B} = \left[ \begin{array}{c c} 1 & 5 \\ 2 & 4 \\ 3 & 2 \end{array} \right]
|
||||
$$
|
||||
|
||||
Here we have $\mathbf{A} = \begin{bmatrix} \mathbf{A}_{11} & \mathbf{A}_{12} \\ \mathbf{A}_{21} & \mathbf{A}_{22} \end{bmatrix}$ ; $\mathbf{B} = \begin{bmatrix} \mathbf{B}_1 \\ \mathbf{B}_2 \end{bmatrix}$
|
||||
|
||||
Therefore, $\mathbf{AB} = \begin{bmatrix} \mathbf{A}_{11}\mathbf{B}_1 + \mathbf{A}_{12}\mathbf{B}_2\\ \mathbf{A}_{21}\mathbf{B}_1 + \mathbf{A}_{22}\mathbf{B}_2 \end{bmatrix}$ (a)
|
||||
|
||||
<!-- source-page: 47 -->
|
||||
|
||||
But
|
||||
|
||||
$$
|
||||
\mathbf {A} _ {1 1} \mathbf {B} _ {1} = \left[ \begin{array}{l l} 5 & 3 \\ 4 & 6 \end{array} \right] \left[ \begin{array}{l l} 1 & 5 \\ 2 & 4 \end{array} \right] = \left[ \begin{array}{l l} 1 1 & 3 7 \\ 1 6 & 4 4 \end{array} \right]
|
||||
$$
|
||||
|
||||
$$
|
||||
\mathbf {A} _ {1 2} \mathbf {B} _ {2} = \left[ \begin{array}{l} 1 \\ 2 \end{array} \right] [ 3 \quad 2 ] = \left[ \begin{array}{l l} 3 & 2 \\ 6 & 4 \end{array} \right]
|
||||
$$
|
||||
|
||||
$$
|
||||
\mathbf {A} _ {2 1} \mathbf {B} _ {1} = [ 1 0 \quad 3 ] \left[ \begin{array}{l l} 1 & 5 \\ 2 & 4 \end{array} \right] = [ 1 6 \quad 6 2 ]
|
||||
$$
|
||||
|
||||
$$
|
||||
\mathbf {A} _ {2 2} \mathbf {B} _ {2} = [ 4 ] [ 3 \quad 2 ] = [ 1 2 \quad 8 ]
|
||||
$$
|
||||
|
||||
Then substituting into (a) we have
|
||||
|
||||
$$
|
||||
\mathbf {A B} = \left[ \begin{array}{l l} 1 4 & 3 9 \\ 2 2 & 4 8 \\ 2 8 & 7 0 \end{array} \right]
|
||||
$$
|
||||
|
||||
EXAMPLE 2.11: Taking advantage of partitioning, evaluate c = Ab, where
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{c c c c} 4 & 3 & 1 & 2 \\ 3 & 6 & 2 & 1 \\ \hline 1 & 2 & 8 & 6 \\ 2 & 1 & 6 & 1 2 \end{array} \right]; \quad \mathbf {b} = \left[ \begin{array}{c} 2 \\ 2 \\ 1 \\ 1 \end{array} \right]
|
||||
$$
|
||||
|
||||
The only products that we need to evaluate are
|
||||
|
||||
$$
|
||||
\mathbf {w} _ {1} = \left[ \begin{array}{l l} 4 & 3 \\ 3 & 6 \end{array} \right] \left[ \begin{array}{l} 1 \\ 1 \end{array} \right] = \left[ \begin{array}{l} 7 \\ 9 \end{array} \right]
|
||||
$$
|
||||
|
||||
and
|
||||
|
||||
$$
|
||||
\mathbf {w} _ {2} = \left[ \begin{array}{l l} 1 & 2 \\ 2 & 1 \end{array} \right] \left[ \begin{array}{l} 1 \\ 1 \end{array} \right] = \left[ \begin{array}{l} 3 \\ 3 \end{array} \right]
|
||||
$$
|
||||
|
||||
We can now construct c:
|
||||
|
||||
$$
|
||||
\mathbf {c} = \left[ \begin{array}{l l} 2 \mathbf {w} _ {1} + & \mathbf {w} _ {2} \\ 2 \mathbf {w} _ {1} + & 2 \mathbf {w} _ {2} \end{array} \right]
|
||||
$$
|
||||
|
||||
or, substituting,
|
||||
|
||||
$$
|
||||
\mathbf {c} = \left[ \begin{array}{l} 1 7 \\ 2 1 \\ 2 0 \\ 2 4 \end{array} \right]
|
||||
$$
|
||||
|
||||
# The Trace and Determinant of a Matrix
|
||||
|
||||
The trace and determinant of a matrix are defined only if the matrix is square. Both quantities are single numbers, which are evaluated from the elements of the matrix and are therefore functions of the matrix elements.
|
||||
|
||||
Definition: The trace of the matrix $\mathbf{A}$ is denoted as $tr(\mathbf{A})$ and is equal to $\sum_{i=1}^{n} a_{ii}$ , where $n$ is the order of $\mathbf{A}$ .
|
||||
|
||||
<!-- source-page: 48 -->
|
||||
|
||||
EXAMPLE 2.12: Calculate the trace of the matrix A given in Example 2.11.
|
||||
|
||||
Here we have
|
||||
|
||||
$$
|
||||
\operatorname{tr} (\mathbf {A}) = 4 + 6 + 8 + 1 2 = 3 0
|
||||
$$
|
||||
|
||||
The determinant of a matrix A can be defined in terms of the determinants of submatrices of A and by noting that the determinant of a matrix of order 1 is simply the element of the matrix; i.e., if $A = [a_{11}]$ , then $\det A = a_{11}$ .
|
||||
|
||||
Definition: The determinant of an $n \times n$ matrix $\mathbf{A}$ is denoted as det $\mathbf{A}$ and is defined by the recurrence relation
|
||||
|
||||
$$
|
||||
\det \mathbf {A} = \sum_ {j = 1} ^ {n} (- 1) ^ {1 + j} a _ {1 j} \det \mathbf {A} _ {1 j} \tag {2.38}
|
||||
$$
|
||||
|
||||
where $\mathbf{A}_{1j}$ is the $(n - 1) \times (n - 1)$ matrix obtained by eliminating the 1st row and jth column from the matrix $\mathbf{A}$ .
|
||||
|
||||
EXAMPLE 2.13: Evaluate the determinant of A, where
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{l l} a _ {1 1} & a _ {1 2} \\ a _ {2 1} & a _ {2 2} \end{array} \right]
|
||||
$$
|
||||
|
||||
Using the relation in (2.38), we obtain
|
||||
|
||||
$$
|
||||
\det \mathbf {A} = (- 1) ^ {2} a _ {1 1} \det \mathbf {A} _ {1 1} + (- 1) ^ {3} a _ {1 2} \det \mathbf {A} _ {1 2}
|
||||
$$
|
||||
|
||||
But $\operatorname{det} \mathbf{A}_{11} = a_{22}; \quad \operatorname{det} \mathbf{A}_{12} = a_{21}$
|
||||
|
||||
Hence $\operatorname{det} \mathbf{A} = a_{11} a_{22} - a_{12} a_{21}$
|
||||
|
||||
This relation is the general formula for the determinant of a $2 \times 2$ matrix.
|
||||
|
||||
It can be shown that to evaluate the determinant of a matrix we may use the recurrence relation given in (2.38) along any row or column, as indicated in Example 2.14.
|
||||
|
||||
EXAMPLE 2.14: Evaluate the determinant of the matrix A, where
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{l l l} 2 & 1 & 0 \\ 1 & 3 & 1 \\ 0 & 1 & 2 \end{array} \right]
|
||||
$$
|
||||
|
||||
Using the recurrence relation in (2.38), we obtain
|
||||
|
||||
$$
|
||||
\begin{array}{l} \det \mathbf {A} = (- 1) ^ {2} (2) \det \left[ \begin{array}{l l} 3 & 1 \\ 1 & 2 \end{array} \right] \\ + (- 1) ^ {3} (1) \det \left[ \begin{array}{l l} 1 & 1 \\ 0 & 2 \end{array} \right] \\ + (- 1) ^ {4} (0) \det \left[ \begin{array}{l l} 1 & 3 \\ 0 & 1 \end{array} \right] \\ \end{array}
|
||||
$$
|
||||
|
||||
<!-- source-page: 49 -->
|
||||
|
||||
We now employ the formula for the determinant of a $2 \times 2$ matrix given in Example 2.13 and have
|
||||
|
||||
$$
|
||||
\det \mathbf {A} = (2) \{(3) (2) - (1) (1) \} - \{(1) (2) - (0) (1) \} + 0
|
||||
$$
|
||||
|
||||
Hence
|
||||
|
||||
$$
|
||||
\det \mathbf {A} = 8
|
||||
$$
|
||||
|
||||
Let us check that the same result is obtained by using (2.38) along the second row instead of the first row. In this case we have, changing the 1 to 2 in (2.38),
|
||||
|
||||
$$
|
||||
\begin{array}{l} \det \mathbf {A} = (- 1) ^ {3} (1) \det \left[ \begin{array}{l l} 1 & 0 \\ 1 & 2 \end{array} \right] \\ + (- 1) ^ {4} (3) \det \left[ \begin{array}{l l} 2 & 0 \\ 0 & 2 \end{array} \right] \\ + (- 1) ^ {5} (1) \det \left[ \begin{array}{l l} 2 & 1 \\ 0 & 1 \end{array} \right] \\ \end{array}
|
||||
$$
|
||||
|
||||
Again using the formula given in Example 2.13, we have
|
||||
|
||||
$$
|
||||
\det \mathbf {A} = - \{(1) (2) - (0) (1) \} + (3) \{(2) (2) - (0) (0) \} - \{(2) (1) - (1) (0) \}
|
||||
$$
|
||||
|
||||
or, as before,
|
||||
|
||||
$$
|
||||
\det \mathbf {A} = 8
|
||||
$$
|
||||
|
||||
Finally, using (2.38) along the third column, we have
|
||||
|
||||
$$
|
||||
\begin{array}{l} \det \mathbf {A} = (- 1) ^ {4} (0) \det \left[ \begin{array}{l l} 1 & 3 \\ 0 & 1 \end{array} \right] \\ + (- 1) ^ {5} (1) \det \left[ \begin{array}{c c} 2 & 1 \\ 0 & 1 \end{array} \right] \\ + (- 1) ^ {6} (2) \det \left[ \begin{array}{l l} 2 & 1 \\ 1 & 3 \end{array} \right] \\ \end{array}
|
||||
$$
|
||||
|
||||
and, as before, obtain det A = 8.
|
||||
|
||||
Many theorems are associated with the use of determinants. Typically, the solution of a set of simultaneous equations can be obtained by a series of determinant evaluations (see, for example, B. Noble [A]). However, from a modern viewpoint, most of the results that are obtained using determinants can be obtained much more effectively. For example, the solution of simultaneous equations using determinants is very inefficient. As we shall see later, a primary value of using determinants lies in the convenient shorthand notation we can use in the discussion of certain questions, such as the existence of an inverse of a matrix. We shall use determinants in particular in the solution of eigenvalue problems.
|
||||
|
||||
In evaluating the determinant of a matrix, it may be effective to first factorize the matrix into a product of matrices and then use the following result:
|
||||
|
||||
$$
|
||||
\det (\mathbf {B C} \cdot \cdot \cdot \mathbf {F}) = (\det \mathbf {B}) (\det \mathbf {C}) \cdot \cdot \cdot (\det \mathbf {F}) \tag {2.39}
|
||||
$$
|
||||
|
||||
<!-- source-page: 50 -->
|
||||
|
||||
Relation (2.39) states that the determinant of the product of a number of matrices is equal to the product of the determinants of each matrix. The proof of this result is rather lengthy and clumsy [it is obtained using the determinant definition in (2.38)], and therefore we shall not include it here. We shall use the result in (2.39) often in eigenvalue calculations when the determinant of a matrix, say matrix A, is required. The specific decomposition used is $A = LDL^{T}$ , where L is a lower unit triangular matrix and D is a diagonal matrix (see Section 8.2.2). In that case,
|
||||
|
||||
$$
|
||||
\det \mathbf {A} = \det \mathbf {L} \det \mathbf {D} \det \mathbf {L} ^ {T} \tag {2.40}
|
||||
$$
|
||||
|
||||
and because det $\mathbf{L} = 1$ , we have
|
||||
|
||||
$$
|
||||
\det \mathbf {A} = \prod_ {i = 1} ^ {n} d _ {i i} \tag {2.41}
|
||||
$$
|
||||
|
||||
EXAMPLE 2.15: Using the $LDL^{T}$ decomposition, evaluate the determinant of A, where A is given in Example 2.14.
|
||||
|
||||
The procedure to obtain the $LDL^{T}$ decomposition of A is presented in Section 8.2. Here we simply give L and D, and it can be verified that $LDL^{T} = A$ :
|
||||
|
||||
$$
|
||||
\mathbf {L} = \left[ \begin{array}{l l l} 1 & 0 & 0 \\ \frac {1}{2} & 1 & 0 \\ 0 & \frac {2}{5} & 1 \end{array} \right]; \quad \mathbf {D} = \left[ \begin{array}{l l l} 2 & 0 & 0 \\ 0 & \frac {5}{2} & 0 \\ 0 & 0 & \frac {8}{5} \end{array} \right]
|
||||
$$
|
||||
|
||||
Using (2.41), we obtain
|
||||
|
||||
$$
|
||||
\det \mathbf {A} = (2) (\frac {5}{2}) (\frac {8}{5}) = 8
|
||||
$$
|
||||
|
||||
This is also the value obtained in Example 2.14.
|
||||
|
||||
The determinant and the trace of a matrix are functions of the matrix elements. However, it is important to observe that the off-diagonal elements do not affect the trace of a matrix, whereas the determinant is a function of all the elements in the matrix. Although we can conclude that a large determinant or a large trace means that some matrix elements are large, we cannot conclude that a small determinant or a small trace means that all matrix elements are small.
|
||||
|
||||
EXAMPLE 2.16: Calculate the trace and determinant of A, where
|
||||
|
||||
$$
|
||||
\mathbf {A} = \left[ \begin{array}{c c} 1 & 1 0, 0 0 0 \\ 1 0 ^ {- 4} & 2 \end{array} \right]
|
||||
$$
|
||||
|
||||
Here we have
|
||||
|
||||
$$
|
||||
\operatorname{tr} (\mathbf {A}) = 3
|
||||
$$
|
||||
|
||||
and $\operatorname{det} \mathbf{A} = (1)(2) - (10^{-4})(10,000)$
|
||||
|
||||
i.e., $\det A = 1$
|
||||
|
||||
Hence both the trace and the determinant of A are small in relation to the off-diagonal element $a_{12}$ .
|
||||
Reference in New Issue
Block a user