本文为《Linear algebra and its applications》的读书笔记

A factorization()factorization (因式分解) of a matrix AA is an equation that expresses AA as a product of two or more matrices. Whereas matrix multiplication involves a synthesissynthesis of data (数据的综合) (combining the effects of two or more linear transformations into a single matrix). In the language of computer science, the expression of AA as a product amounts to a preprocessing of the data in AA, organizing that data into two or more parts whose structures are more useful in some way, perhaps more accessible for computation(便于计算).

The LU Factorization LU分解

The LU factorization is motivated by the fairly common industrial and business problem of solving a sequence of equations, all with the same coefficient matrix:
Ax=b1,Ax=b2,...,Ax=bp     (1)A\boldsymbol x = \boldsymbol b_1,A\boldsymbol x = \boldsymbol b_2,...,A\boldsymbol x = \boldsymbol b_p \ \ \ \ \ (1)When AA is invertible, one could compute A1A^{-1} and then compute A1b1A^{-1}\boldsymbol b_1, A1b2A^{-1}\boldsymbol b_2, and so on. However, it is more efficient to solve the first equation in sequence (1) by row reduction and obtain an LU factorization of AA at the same time. Thereafter, the remaining equations in sequence (1) are solved with the LU factorization.

At first, assume that AA is an m×nm \times n matrix that can be row reduced to echelon form, without row interchangeswithout\ row\ interchanges. (Later, we will treat the general case.) Then AA can be written in the form A=LUA = LU, where LL is an m×mm \times m lower triangular matrix with 1’s on the diagonal and UU is an m×nm \times n echelon form of AA. For instance, see Figure 1. Such a factorization is called an LULU factorization of AA. The matrix LL is invertible and is called a unitunit lower triangular matrix(单位下三角矩阵).

2.5 Matrix factorizations (矩阵因式分解)
Before studying how to construct LL and UU, we should look at why they are so useful. When A=LUA = LU, the equation Ax=bA\boldsymbol x = \boldsymbol b can be written as L(Ux)=bL(U\boldsymbol x)=\boldsymbol b. Writing y\boldsymbol y for UxU\boldsymbol x, we can find x\boldsymbol x by solving the pair of equations
2.5 Matrix factorizations (矩阵因式分解)
First solve Ly=bL\boldsymbol y = \boldsymbol b for y\boldsymbol y; and then solve Ux=yU\boldsymbol x =\boldsymbol y for x\boldsymbol x. See Figure 2. Each equation is easy to solve because LL and UU are triangular.
2.5 Matrix factorizations (矩阵因式分解)
EXAMPLE 1
It can be verified that
2.5 Matrix factorizations (矩阵因式分解)
Use this LU factorization of AA to solve Ax=bA\boldsymbol x = \boldsymbol b, where b=[95711]\boldsymbol b =\begin{bmatrix} -9\\5\\7\\11\end{bmatrix}.
SOLUTION The solution of Ly=bL\boldsymbol y = \boldsymbol b needs only 6 multiplications and 6 additions.
2.5 Matrix factorizations (矩阵因式分解)
Then, for Ux=yU\boldsymbol x = \boldsymbol y, the “backward” phase of row reduction requires 4 divisions, 6 multiplications,
and 6 additions. (For instance, creating the zeros in column 4 requires 1 division in row 4 and 3 multiplication–addition pairs to add multiples of row 4 to the rows above.)
2.5 Matrix factorizations (矩阵因式分解)
To find x\boldsymbol x requires 28 arithmetic operations, or “flops” (floating point operations), excluding the cost of finding LL and UU. In contrast, row reduction of [  A   b  ][ \ \ A\ \ \ \boldsymbol b\ \ ] to [  I   x  ][ \ \ I\ \ \ \boldsymbol x\ \ ] takes 62 operations.

Checkpoint: Section 2.2 shows how to compute A1BA^{–1}B by row reduction. Describe how you could speed up this calculation if you have an LU factorization of AA available (and AA is invertible).
Answer: If AA is an invertible n×nn\times n matrix, with an LU factorization A=LUA = LU, and if BB is n×pn\times p, then A1BA^{–1}B can be computed by first row reducing [  L   B  ][\ \ L\ \ \ B\ \ ] to a matrix [  I   Y  ][\ \ I\ \ \ Y\ \ ] for some YY and then reducing [   U  Y   ][\ \ \ U\ \ Y\ \ \ ] to [  I   A1B  ][\ \ I\ \ \ A^{–1}B\ \ ]. MATLAB uses this approach to compute A1BA^{–1}B (after first finding L and U).

EXAMPLE
When AA is invertible, MATLAB finds A1A^{-1} by factoring A=LUA =LU (where LL may be permuted lower triangular), inverting LL and UU, and then computing U1L1U^{-1}L^{-1}.

An LU Factorization Algorithm

Suppose AA can be reduced to an echelon form UU using only row replacements that add a multiple of one row to another row below it. In this case, there exist unit lower triangular elementary matrices E1,...,EpE_1,...,E_p such that
Ep...E1A=U      (3)E_p...E_1A=U\ \ \ \ \ \ (3)Then
A=(Ep...E1)1U=LUA=(E_p...E_1)^{-1}U=LUIt can be shown that products and inverses of unit lower triangular matrices are also unit lower triangular. Thus LL is unit lower triangular.

PROOF
Let AA be a lower triangular n×nn \times n matrix with nonzero entries on the diagonal. Show that AA is invertible and A1A^{-1} is lower triangular.
[Hint: Explain why AA can be changed into II using only row replacements and scaling. Also, explain why the row operations that reduce AA to II change II into a lower triangular matrix.] 也可以用上一节介绍的分块矩阵+数学归纳法来证明

Note that the row operations in equation (3), which reduce AA to UU, also reduce the LL in equation (4) to II. This observation is the key to constructing LL.
2.5 Matrix factorizations (矩阵因式分解)
Step 1 is not always possible, but when it is, the argument above shows that an LU factorization exists.

EXAMPLE 2
Find an LU factorization of
2.5 Matrix factorizations (矩阵因式分解)
SOLUTION
Since AA has four rows, LL should be 4×44 \times 4. The first column of LL is the first column of AA divided by the top pivot entry:
2.5 Matrix factorizations (矩阵因式分解)
Compare the first columns of AA and LL. The row operations that create zeros in the first column of AA will also create zeros in the first column of LL. To make this same correspondence of row operations on AA hold for the rest of LL, watch a row reduction of AA to an echelon form UU. That is, highlight the entries in each matrix that are used to determine the sequence of row operations that transform AA into UU.
2.5 Matrix factorizations (矩阵因式分解)
The highlighted entries determine the row reduction of AA to UU. At each pivot column, divide the highlighted entries by the pivot and place the result into LL:
2.5 Matrix factorizations (矩阵因式分解)
In practical work, row interchanges are nearly always needed, because partial pivoting(部分主元法) is used for high accuracy. (Recall that this procedure selects, among the possible choices for a pivot, an entry in the column having the largest absolute value.)

To handle row interchanges, the LU factorization above can be modified easily to produce an LL that is permuted lower triangularpermuted\ lower\ triangular(置换下三角矩阵), in the sense that a rearrangement (called a permutation) of the rows of LL can make LL (unit) lower triangular.
The resulting permuted LU factorizationpermuted\ LU\ factorization(置换LU分解) solves Ax=bA\boldsymbol x = \boldsymbol b in the same way as before, except that the reduction of [  L   b  ][\ \ L\ \ \ \boldsymbol b\ \ ] to [  I   y  ][\ \ I\ \ \ \boldsymbol y\ \ ] follows the order of the pivots in LL from left to right, starting with the pivot in the first column. A reference to an “LU factorization” usually includes the possibility that LL might be permuted lower triangular. For details, see the Appendix.

2.5 Matrix factorizations (矩阵因式分解)

A Matrix Factorization in Electrical Engineering

Matrix factorization is intimately related to the problem of constructing an electrical network with specified properties.

Suppose the box in Figure 3 represents some sort of electric circuit, with an input and output.
2.5 Matrix factorizations (矩阵因式分解)
Record the input voltage and current by [v1i1]\begin{bmatrix}v_1\\i_1\end{bmatrix} and record the output voltage and current by [v2i2]\begin{bmatrix}v_2\\i_2\end{bmatrix}. Frequently, the transformation [v1i1][v2i2]\begin{bmatrix}v_1\\i_1\end{bmatrix}\mapsto\begin{bmatrix}v_2\\i_2\end{bmatrix} is linear. That is, there is a matrix AA, called the transfer matrix()transfer\ matrix(传递矩阵), such that
[v2i2]=A[v1i1]\begin{bmatrix}v_2\\i_2\end{bmatrix}=A\begin{bmatrix}v_1\\i_1\end{bmatrix}Figure 4 shows a ladder networkladder\ network. The left circuit in Figure 4 is called a series circuit()series\ circuit(串联电路), with resistance R1R_1.
2.5 Matrix factorizations (矩阵因式分解)
The right circuit in Figure 4 is a shunt circuit()shunt\ circuit(并联电路), with resistance R2R_2. Using Ohm’s law and Kirchhoff’s laws, one can show that the transfer matrices of the series and shunt circuits, respectively, are
2.5 Matrix factorizations (矩阵因式分解)
EXAMPLE 3
a. Compute the transfer matrix of the ladder network in Figure 4.
b. Design a ladder network whose transfer matrix is [18.55]\begin{bmatrix} 1&-8\\-.5&5 \end{bmatrix}.
SOLUTION
a. Let A1A_1 and A2A_2 be the transfer matrices of the series and shunt circuits, respectively. Then the transfer matrix of the ladder network corresponds to composition of linear transformations
2.5 Matrix factorizations (矩阵因式分解)
b. To factor the matrix [18.55]\begin{bmatrix} 1&-8\\-.5&5 \end{bmatrix} into the product of transfer matrices, as in equation
(6), look for R1R_1 and R2R_2 in Figure 4 to satisfy
2.5 Matrix factorizations (矩阵因式分解)
A network transfer matrix summarizes the input–output behavior (the design specifications) of the network without reference to the interior circuits. To physically build a network with specified properties, an engineer first determines if such a network can be constructed (or realized). Then the engineer tries to factor the transfer matrix into matrices corresponding to smaller circuits that perhaps are already manufactured and ready for assembly. In the common case of alternating current(交流电), the entries in the transfer matrix are usually rational complex-valued functions. A standard problem is to find a minimal realization that uses the smallest number of electrical components.

The QR Factorization QR分解

Suppose A=QRA = QR; where QQ and RR are n×nn \times n. RR is invertible and upper triangular, and QQ has the property that QTQ=IQ^TQ = I. It can be shown that for each b\boldsymbol b in Rn\mathbb R^n, the equation Ax=bA\boldsymbol x =\boldsymbol b has a unique solution.

When A=QRA =QR, the equation Ax=bA\boldsymbol x = \boldsymbol b can be written as Q(Rx)=bQ(R\boldsymbol x)=\boldsymbol b. Then Rx=QTbR\boldsymbol x=Q^T\boldsymbol b, which is easy to solve.

Appendix: Permuted LU Factorizations 置换LU分解

Any m×nm\times n matrix AA admits a factorization A=LUA = LU, with UU in echelon form and LL a permuted unit lower triangular matrix. That is, LL is a matrix such that a permutation (rearrangement) of its rows (using row interchanges) will produce a lower triangular matrix with 1’s on the diagonal.

The construction of LL and UU, illustrated below, depends on first using row replacements to reduce AA to a permuted echelon form VV and then using row interchanges to reduce VV to an echelon form UU. By watching the reduction of AA to VV, we can easily construct a permuted unit lower triangular matrix LL with the property that the sequence of operations changing AA into UU also changes LL into II. This property will guarantee that A=LUA = LU.

The following algorithm reduces any matrix to a permuted echelon form. In the algorithm when a row is covered, we ignore it in later calculations.

  1. Begin with the leftmost nonzero column. Choose any nonzero entry as the pivot. Designate the corresponding row as a pivot row.
  2. Use row replacements to create zeros above and below the pivot (in all uncovered rows). Then cover that pivot row.
  3. Repeat steps 1 and 2 on the uncovered submatrix, if any, until all nonzero entries are
    covered.

As an example, choose any entry in the first column of the following matrix as the first pivot, and use the pivot to create zeros in the rest of column 1. We choose the (3, 1)-entry.
2.5 Matrix factorizations (矩阵因式分解)
Row 3 is the first pivot row. Choose the (2, 2)-entry as the second pivot, and create zeros in the rest of column 2, excluding the first pivot row.
2.5 Matrix factorizations (矩阵因式分解)
Cover row 2 and choose the (4, 4)-entry as the pivot. Create zeros in the other rows, excluding the
first two pivot rows.
2.5 Matrix factorizations (矩阵因式分解)
Let VV denote this permuted echelon form, and permute the rows of VV to create an echelon form. The resulting echelon matrix UU is
2.5 Matrix factorizations (矩阵因式分解)
The last step is to create LL. Go back and watch the reduction of AA to VV. As each pivot is selected, take the pivot column, and divide the pivot into each entry in the column that is not yet in a pivot row. Place the resulting column into LL. At the end, fill the holes in LL with zeros.
2.5 Matrix factorizations (矩阵因式分解)
The next example illustrates what to do when VV has one or more rows of zeros. For the reduction of AA to VV, pivots were chosen to have the largest possible magnitude (the choice used for “partial pivoting”).
2.5 Matrix factorizations (矩阵因式分解)
The first three columns of LL come from the three pivot columns above.
2.5 Matrix factorizations (矩阵因式分解)
The matrix LL needs two more columns. Use columns 1 and 3 of the 5×55\times5 identity matrix to place 1’s in the “nonpivot” rows 1 and 3. Fill in the remaining holes with zeros.
2.5 Matrix factorizations (矩阵因式分解)

相关文章:

  • 2022-01-22
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-05
  • 2022-12-23
  • 2021-11-13
猜你喜欢
  • 2021-10-26
  • 2022-01-11
  • 2022-01-03
  • 2021-09-13
  • 2022-12-23
  • 2021-07-20
  • 2021-12-29
相关资源
相似解决方案