ComputeSymPosDefMatrix

Prototype

Matrix ComputeSymPosDefMatrix( Matrix mDim )

Return Value

The return value is an mDim x mDim matrix that is symmetric and positive definite.

Parameters

Matrix mDim
The number of rows and columns in the returned matrix.

Remarks

This module generates a symmetric positive definite matrix of a given size. Some algorithms require a symmetric positive definite matrix, for example the Cholesky matrix decomposition (see the SAS/IML ROOT function) or the linear conjugate gradient algorithm. Symmetric positive definite matrices arise naturally in statistics as the cross product matrix A`A where A has full column rank. The matrix returned by this module is not necessarily a cross-product matrix.

Example
m = ComputeSymPosDefMatrix( 5 );
print m;
See Also

CreateHilbertMatrix
LinearConjugateGradient