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

