Problem with cholesky decomposition

조회 수: 2 (최근 30일)
Peter Ouwehand
Peter Ouwehand 2020년 5월 19일
댓글: Christine Tobler 2020년 5월 19일
When I apply the chol function to A = [1 -1; 0 1], it correctly informs me that the matrix is not positive definite.
But when I run chol(A, 'lower'), the answer is the identity matrix [1 0; 0 1].
Can anyone replicate this? Any reasons why this should be so?

채택된 답변

David Goodmanson
David Goodmanson 2020년 5월 19일
Hi Peter,
when you use the 'lower' option, chol assumes that the upper triangle is the complex conjugate transpose of the lower triangle. In this case that means that chol assumes the matrix is [1 0; 0 1], the identity matrix. So of course the cholesky decomposition is also the identity matrix.
  댓글 수: 1
Christine Tobler
Christine Tobler 2020년 5월 19일
When chol(A) is called without the 'lower' or 'upper' option, this is treated as if the 'upper' option had been chosen: So in the first example, chol assumes the matrix is [1 -1; -1 1]. This is because the Cholesky decomposition only works for symmetric matrices.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by