\Header{chol2inv}{Inverse from Choleski Decomposition}
\keyword{algebra}{chol2inv}
\keyword{array}{chol2inv}
\begin{Description}\relax
Invert a symmetric, positive definite square matrix from its Choleski
decomposition.\end{Description}
\begin{Usage}
\begin{verbatim}
chol2inv(x, size = ncol(x))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a matrix.  The first \code{nc} columns of the upper triangle
contain the Choleski decomposition of the matrix to be inverted.
\item[\code{size}] the number of columns of \code{x} containing the
Choleski decomposition.
\end{ldescription}
\end{Arguments}
\begin{Value}
The inverse of the decomposed matrix.\end{Value}
\begin{References}\relax
Dongarra, J. J., Bunch, J. R., Moler, C. B. and Stewart, G. W. (1978)
\emph{LINPACK Users Guide}.  Philadelphia: SIAM Publications.\end{References}
\begin{SeeAlso}\relax
\code{\Link{chol}}, \code{\Link{solve}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
cma <- chol(ma  <- cbind(1, 1:3, c(1,3,7)))
t(cma) %*% cma # = ma
all.equal(diag(3), ma %*% chol2inv(cma))
\end{ExampleCode}
\end{Examples}

