MATLAB: Problem with cholesky decomposition

choleskypositive definite

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?

Best Answer

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.