Why doesnt chol work for hermitian positive semi-definite matrix?

13 次查看(过去 30 天)
Hello,
I am trying to perform factorization of form A = R'*R using matlab function 'chol' but A is not positive definite, rather its hermitian positive semi-definite. As per theory from https://en.wikipedia.org/wiki/Hermitian_matrix , I should be able to perform factorization but matlab expects A to be positive definite matrix. Is there an alternative function in matlab?
Thanks,
  3 个评论
Nikhil Challa
Nikhil Challa 2022-9-25
@Geoff Hayes , the https://en.wikipedia.org/wiki/Cholesky_decomposition link also talks about decomposition for hermitian positive semi-definite matrix except the solution may not be unique. Matlab has lot of functions that provide solution even for non-unique cases, so I would expect matlab to do the same for 'chol' function also.
Let me know if my understanding is incorrect.

请先登录,再进行评论。

采纳的回答

Pravarthana P
Pravarthana P 2022-9-28
Hi Nikil Challa,
I understand that you are trying to perform factorization using “chol” function and are facing an issue with positive semi-definite matrix.
The “chol” function expects a symmetric positive definite matrix as input as mentioned in the documentation link.
The following can likely be a workaround to factorize positive semi-definite matrix:
  1. Compute the LDL decomposition: A lower-triangular matrix L, a block-diagonal matrix D (1-by-1 and 2-by-2 blocks), and a permutation matrix P, such that A is P*L*D*L'*P' :
[L, D, P] = ldl(A);
2.Compute the eigenvalue decomposition, set its negative eigenvalues to zero, and use QR to get two triangular factors for this modified matrix:
[U, d] = eig(A, 'vector'); % A == U*diag(d)*U'
d(d < 0) = 0; % Set negative eigenvalues of A to zero
[~, R] = qr(diag(sqrt(d))*U');
% Q*R == sqrt(D)*U', so A == U*diag(d)*U'== R'*Q'*Q*R == R'*R
% In this case, check that d(d<0) are all nearly zero.
3.Add a small number to A’s diagonal before calling Cholesky:
R=chol(A+1e-13*eye(size(A)));
To know more information on why the “chol” function cannot be used to factorize positive semi-definite matrix, you can refer to the link.
I hope this information helps you.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by