cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

SOLVED
Visitor

## MathCAD Function to create Positive Definite Matrices?

Does MathCAD offer a function that creates Real, Positive Definite Matrices of a specified size? For example, say I'd like a square matrix of size 10 x 10 that is positive definite. Is there a function that does this?

Alternately, if that is not available, perhaps I could use a work-around: create the Lower Triangular (L), or Upper Triangular (U), portion of a symmetric matrix, multiply it myself to create the full symmetric matrix. Hopefully, the result would be a positive definite matrix. Does MathCAD offer a function that outputs L or U?

1 ACCEPTED SOLUTION

Accepted Solutions

## Re: MathCAD Function to create Positive Definite Matrices?

Positive Definite Matrices of any size like 10 cannot be answered as their are thoudands of matrices that will fit this bill, so there is no function.

You can take eigenvals(M) of a matrix M to prove it is positive definite.

The simplest to produce is a square matrix size(n,n) that has the two positive eigenvalues 1 and n+1

The code enclosed has created such a function that will create a positive definite matrix of any size n x n.

2 REPLIES 2

## Re: MathCAD Function to create Positive Definite Matrices?

Positive Definite Matrices of any size like 10 cannot be answered as their are thoudands of matrices that will fit this bill, so there is no function.

You can take eigenvals(M) of a matrix M to prove it is positive definite.

The simplest to produce is a square matrix size(n,n) that has the two positive eigenvalues 1 and n+1

The code enclosed has created such a function that will create a positive definite matrix of any size n x n.

## Re: MathCAD Function to create Positive Definite Matrices?

Sorry forgot the file

Announcements