chol() function in R keeps returning Upper Triangular (I need Lower Triangular)
<p>I am trying to get the Lower Triangular Cholesky Decomposition of the following matrix in R using the <code>chol()</code> function. However, it keeps returning the Upper Triangular Decomposition and I can't seem to find a way to get the Lower Triangular Decomposition, even after looking through the documentation. The following is the code that I am using - </p>

<pre><code>x &lt;- matrix(c(4,2,-2, 2,10,2, -2,2,5), ncol = 3, nrow = 3)
Q &lt;- chol(x)
Q
#       [,1] [,2]      [,3]
#  [1,]    2    1 -1.000000
#  [2,]    0    3  1.000000
#  [3,]    0    0  1.732051
</code></pre>

<p>I basically need to find the matrix <code>Q</code> such that <code>QQ' = X</code>. Thanks for your help!</p>