Cholesky_decomposition

from:
http://en.wikipedia.org/wiki/Cholesky_decomposition

The Cholesky-Banachiewicz and Cholesky-Crout algorithms

If we write out the equation A = LL*,

{\mathbf{A=LL^T}} =\begin{pmatrix}   L_{11} & 0 & 0 \\L_{21} & L_{22} & 0 \\L_{31} & L_{32} & L_{33}\\\end{pmatrix}\begin{pmatrix}   L_{11} & L_{21} & L_{31} \\0 & L_{22} & L_{32} \\0 & 0 & L_{33}\\\end{pmatrix}=\begin{pmatrix}   L_{11}^2 &   &(symmetric)   \\L_{21}L_{11} & L_{21}^2 + L_{22}^2& \\L_{31}L_{11} & L_{31}L_{21}+L_{32}L_{22} & L_{31}^2 + L_{32}^2+L_{33}^2 \\\end{pmatrix}

we obtain the following formula for the entries of L:

L_{i,j} = \frac{1}{L_{j,j}} \left( A_{i,j} - \sum_{k=1}^{j-1} L_{i,k} L_{j,k} \right), \qquad\mbox{for } i>j.
L_{i,i} = \sqrt{ A_{i,i} - \sum_{k=1}^{i-1} L_{i,k}^2 }.

The expression under the square root is always positive if A is real and positive-definite.

For complex Hermitian matrix, the following formula applies:

L_{i,j} = \frac{1}{L_{j,j}} \left( A_{i,j} - \sum_{k=1}^{j-1} L_{i,k} L_{j,k}^* \right), \qquad\mbox{for } i>j.
L_{i,i} = \sqrt{ A_{i,i} - \sum_{k=1}^{i-1} L_{i,k}L_{i,k}^* }.

So we can compute the (i, j) entry if we know the entries to the left and above. The computation is usually arranged in either of the following orders.

  • The Cholesky-Banachiewicz algorithm starts from the upper left corner of the matrix L and proceeds to calculate the matrix row by row.
  • The Cholesky-Crout algorithm starts from the upper left corner of the matrix L and proceeds to calculate the matrix column by column.
[ edit] Stability of the computation

Suppose that we want to solve a well-conditioned system of linear equations. If the LU decomposition is used, then the algorithm is unstable unless we use some sort of pivoting strategy. In the latter case, the error depends on the so-called growth factor of the matrix, which is usually (but not always) small.

Now, suppose that the Cholesky decomposition is applicable. As mentioned above, the algorithm will be twice as fast. Furthermore, no pivoting is necessary and the error will always be small. Specifically, if we want to solve Ax = b, and y denotes the computed solution, then y solves the disturbed system (A + E)y = b where

\|\mathbf{E}\|_2 \le c_n \varepsilon \|\mathbf{A}\|_2.

Here, || ||2 is the matrix 2-norm, cn is a small constant depending on n, and ε denotes the unit round-off.

There is one small problem with the Cholesky decomposition. Note that we must compute square roots in order to find the Cholesky decomposition. If the matrix is real symmetric and positive definite, then the numbers under the square roots are always positive in exact arithmetic. Unfortunately, the numbers can become negative because of round-off errors, in which case the algorithm cannot continue. However, this can only happen if the matrix is very ill-conditioned.

[ edit] Avoiding taking square roots

An alternative form is the factorization[2]

Cholesky_decomposition - wwweurope - wwweurope的博客

This form eliminates the need to take square roots. When A is positive definite the elements of the diagonal matrix D are all positive. However this factorization can be used for any square, symmetrical matrix.

The following recursive relations apply for the entries of D and L:

L_{ij} = \frac{1}{D_{j}} \left( A_{ij} - \sum_{k=1}^{j-1} L_{ik} L_{jk} D_{k} \right), \qquad\mbox{for } i>j.
D_{i} = A_{ii} - \sum_{k=1}^{i-1} L_{ik}^2 D_{k}

For complex Hermitian matrix, the following formula applies:

L_{ij} = \frac{1}{D_{j}} \left( A_{ij} - \sum_{k=1}^{j-1} L_{ik} L_{jk}^* D_{k} \right), \qquad\mbox{for } i>j.
D_{i} = A_{ii} - \sum_{k=1}^{i-1} L_{ik}L_{ik}^* D_{k}
refer to: Numerical Recipes in C++ ,2.9 cholesky decomposition.
about implement code(it need sqrt, not above "Avoiding taking square roots").

转载于:https://www.cnblogs.com/europelee/archive/2010/02/07/3388672.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值