Software packages seem to prefer to work with the upper triangular part of the Cholesky factorization, see for example cholupdate. Why is this? It seems that it is more natural to represent a covariance matrix by it's lower triangular Cholesky factorization. For example, $L z$, where $L$ is the lower triangular Cholesky factorization and $z$ is a vector of standard normal normals, will give you a sample from a multivariate normal distribution. What are the uses of the upper triangular part?

  • $\begingroup$ The equivalent of poetic license on Chelesky's part. $\endgroup$ – rvl Oct 2 '14 at 20:03
  • $\begingroup$ Some programs output the triangular matrix, the Cholesky root, as lower-triangular, and some output the same matrix as upper triangular. $\endgroup$ – ttnphns Oct 2 '14 at 21:27
  • $\begingroup$ The "uses" are exactly the same either way. One reason to choose to work with $R=L^\top$ rather than $L$ might simply be that in the $QR$ decomposition you work with an upper triangular part and for the Choleski you have the choice -- so you can choose to save some effort and only work with $R$. That saves a whole lot of coding and debugging. $\endgroup$ – Glen_b Aug 29 '16 at 5:14

Traditionally, and in most of the "world" (literature), the convention that the Cholesky factor is lower triangular is the most common, i.e., $LL^T$.

In MATLAB and Octave, among others (R's chol), Cholesky factor is defined to be upper triangular, i.e., $R^TR$. This convention was inherited by MATLAB from LINPACK, because MATLAB was originally a front end for LINPACK and EISPACK.

LINPACK chose the then (1970s) unusual convention of defining Cholesky factor to be upper triangular, This was due to its consistency with the QR decomposition, in which R is upper triangular (see the footnote on p. 28 of http://www.netlib.org/utk/people/JackDongarra/PAPERS/Chapter2-LINPACK.pdf ).

LINPACK's successor, LAPACK, does not have a default for upper vs. lower triangular, and makes the user specify which convention to use.

Either way works. Note that $L^T = R$. The important thing is to use the Cholesky factor in a manner commensurate with the convention.


It's really a matter of preference. Also $U'z$ will give you the same sample from a multivariate normal. Why? I'll leave this as an exercise for you.

For me it is more natural the upper Cholesky factorization $A = U'U$ as I am more used to the `jik' algorithm, which takes the name from the ordering of the indices in the nested loops.

Remember that the function is implementing an algorithm. So, if they coded the Cholesky `jik' algorithm, they will first return the upper factor as this algorithm returns that. If a lower factor is explicitly asked for, then they will do an extra computation (transposing the upper factor).

If you prefer the lower, go for it!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.