如何从特征值分解中得到 Cholesky 分解?

计算科学 矩阵分解
2021-12-20 07:47:46

我有

S=QLQT

我知道QLQT

如何获得Cholesky 分解RRTS=RTR

1个回答

让我将特征分解重写为:现在,考虑 QR 分解,其中是单一的,是上三角形。为了唯一性,必须确保具有正对角线条目。的相应行是 Cholesky 分解。S=UDUDU=QRQRRRS=RR

这是一个要重现的 MATLAB 代码段:

n = 5;
A = rand(n); 

% construct S to be positive-definite:
S = A'*A; 
S = S + n*eye(n);
[U,D] = eig(S); % we assume this to be given.

% original cholesky for comparisons
Rchol = chol(S);

% perform the proposed Cholesky
[~,Rqr] = qr(sqrt(D) * U');
Dg = diag(sign(diag(Rqr)));
Rqr = Dg * Rqr;

% now verify that Rqr = Rchol are the same
disp(['error in R: ' num2str(norm(Rchol-Rqr))]);

% now verify that S can be reconstructed from Rqr
disp(['reconstruction error: ' num2str(norm(S - Rqr'*Rqr))]);

% both results should be almost 0 (up to the numerical precision)

如果是满秩且正定的,则​​ Cholesky 分解是唯一的。S