Factoring Matrices
Use the Simplify > Factor commandU08MH3 or the Factoring FunctionsFactoring_Functions to factor a matrix into Turing LU form or Gram-Schmidt QR form.
The result of factoring a matrix into Turing form is the matrix product P·L·D·U·R, where P is a permutation matrix, L is a unit lower-triangular matrix, D is a diagonal matrix, U is a unit upper-triangular matrix, and R is the reduced row echelon form of the original matrix. Thus Turing factoring is a generalization and combination of LU factoring and reduction to row echelon form (for details, see Row Echelon FormRow_Echelon_Form).
The P (permutation) matrix is based on partial pivoting for numerical entries in the matrix and on non-symbolic pivoting for symbolic entries. For example, the P matrix resulting from Turing factoring the matrix
[x, 3, 1; 2, 5, 3; 3, 3, 2]
is
⎡ 0 0 1 ⎤
⎢ ⎥
⎢ 0 1 0 ⎥
⎢ ⎥
⎣ 1 0 0 ⎦
since the numerical entries 2 and 3 in the first column of the original matrix are preferred over the symbolic entry x, and the 3 is preferred over the 2 because of partial pivoting.
The D matrix resulting from Turing factoring the above matrix is
⎡ 3 0 0 ⎤
⎢ ⎥
⎢ 0 3 0 ⎥
⎢ ⎥
⎢ x + 6 ⎥
⎢ 0 0 - ——————— ⎥
⎣ 9 ⎦
Note that the determinant of this D matrix (i.e. the product of the diagonal entries) is zero if x equals -6. This indicates that the factors of the original matrix may not be valid for the special case x equals -6. In general when a matrix containing symbolic entries is factored into Turing form, the special cases can be determined by setting the determinant of the D matrix equal zero. For these special cases, the factoring should be examined separately.
When Turing factoring is used to find the LU factors of a matrix and the results compared with textbooks, it should be noted that different writers use different definitions of LU factoring. Specifically, Crout LU factors combine the L and D matrices into a single new matrix L, while Doolittle LU factors combine the D and U matrices into a single new matrix U.
The result of factoring a square, full-rank matrix into Gram-Schmidt form is the matrix product Q·R, where Q is an orthonormal matrix (meaning Q·Q` = Q`·Q = I), and R is a right, or upper, triangular matrix.
The result of factoring a rectangular, full-rank matrix into Gram-Schmidt form is the matrix product Q·R corresponding to the reduced QR factors (meaning that Q has the same dimensions as A). In this case, Q is no longer orthonormal, but it is still the case that Q`·Q = I.
The result of factoring a rank deficient matrix into Gram-Schmidt form is the matrix product Q·R·P, where P is a permutation matrix that collects zero columns at the end of the matrix, but full column pivoting is not used.
Note that QR factoring is unique up to choices of sign. For example, the matrix
[5, 1; 12, 3]
QR factors to
⎡ 5 12 ⎤ ⎡ 41 ⎤
⎢ ———— - ———— ⎥ ⎢ 13 ———— ⎥
⎢ 13 13 ⎥ ⎢ 13 ⎥
⎢ ⎥·⎢ ⎥
⎢ 12 5 ⎥ ⎢ 3 ⎥
⎢ ———— ———— ⎥ ⎢ 0 ———— ⎥
⎣ 13 13 ⎦ ⎣ 13 ⎦
however
⎡ 5 12 ⎤ ⎡ 41 ⎤
⎢ - ———— ———— ⎥ ⎢ -13 - ———— ⎥
⎢ 13 13 ⎥ ⎢ 13 ⎥
⎢ ⎥·⎢ ⎥
⎢ 12 5 ⎥ ⎢ 3 ⎥
⎢ - ———— - ———— ⎥ ⎢ 0 - ———— ⎥
⎣ 13 13 ⎦ ⎣ 13 ⎦
is also a valid QR factoring of the matrix.
Created with the Personal Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites