### 15.1.14 Testing positive definiteness of a symmetric matrix

The isposdef command checks whether the given symmetric matrix A∈ℝn× n is positive definite, i.e. whether xTAx>0 for all vectors x∈ℝn.

isposdef takes a symmetric matrix A as its only argument and returns true if A is positive definite and false otherwise. Note that this procedure does not check whether A is symmetric.

#### Example

isposdef([[1,-1,2],[-1,4,3],[2,3,-5]])

1 |  |  |  |  |  |  |  |  |  |

isposdef([[1,-1,2],[-1,-2,3],[2,3,-5]])

0 |  |  |  |  |  |  |  |  |  |