# Introduction

Positive-definite matrices have some nice properties which we will exploit in finding more convenient decompositions which require less memory.

# Background

Useful background for this topic includes:

• Matrix multiplication and inner (dot) products

# Theory

A symmetric n × n matrix M is said to be positive definite if for all nonzero vectors v, the product vTMv > 0.

Looking more closely at this product, we see that it is the dot product of vT and Mv. You will recall that the dot product of two vectors is equal to vTMv = ||v||2 ||Mv||2 cos(θ), where θ is the angle between v and Mv, and and thus, for the dot product to be positive, it means that the image of v must have an angle θ less than 90o, i.e., |θ| < π/2.

It is unreasonable to test every possible vector v to determine if a matrix is positive definite, however, there are some cases which appear quite often in engineering where it is quite simple to state that a matrix is positive definite. These are covered on the howtos. The following are some interesting theorems related to positive definite matrices:

## Theorem 4.2.1

A matrix is invertible if and only if all of the eigenvalues are non-zero.

## Theorem 4.2.2

A positive definite matrix M is invertible.

Proof: if it was not, then there must be a non-zero vector x such that Mx = 0. Therefore xTMx = 0 which contradicts our assumption about M being positive definite.

## Theorem 4.2.3

All the eigenvalues with corresponding real eigenvectors of a positive definite matrix M are positive.

Proof: if x is an eigenvector of M then Mx = λx and therefore xTMx = λ||x||2. For this to be positive, it follows that λ > 0.

# Determining Positive-definiteness

A symmetric matrix is positive definite if:

1. all the diagonal entries are positive, and
2. each diagonal entry is greater than the sum of the absolute values of all other entries in the corresponding row/column.

An arbitrary symmetric matrix is positive definite if and only if each of its principal submatrices has a positive determinant. This is known as Sylvester's criterion.

Note that only the last case does the implication go both ways.

# Diagonal Dominance

A matrix M is row diagonally dominant if

for i = 1, ..., n, column diagonally dominant if

for i = 1, ..., n, and diagonally dominant if it is both row and column diagonally dominant.

Thus, we may restate our first definition as:

A symmetric row diagonally-dominant matrix with positive diagonal entries is positive definite.

# Error Analysis

[an error occurred while processing this directive]

# Example 1

Show that if A is invertible, then ATA is positive definite.

If A is invertible, then Av0 for any vector v0. Therefore vT(ATA)v = (vTAT)(Av) which is the vector Av dotted with itself, that is, the square of the norm (or length) of the vector. As Av0, the norm must be positive, and therefore vT(ATA)v > 0.

# Question 1

Create a random positive-definite n × n matrix in which is also diagonally dominant.

( rand(n, n) + (n - 1)*eye( n ) )

# Question 3

Which of the following matrices are positive definite?

a.
b.
c.

# Applications to Engineering

The conductance matrix of a RLC circuit is positive definite. Additionally, we will see that the matrix defined when performing least-squares fitting is also positive definite.

As an alternate example, the Hurwitz criteria for the stability of a differential equation requires that the constructed matrix be positive definite. This is seen in signals and linear systems.

# Matlab

A test for positive definiteness requires that the matrix is symmetric and that all the eigenvalues are positive.

```all( all( M == M' ) ) & min( eig( M ) ) > 0
```

Alternatively, one may use the test

```M = [...];     % assume M is square
isposdef = true;
for i=1:length(M)
if ( det( M(1:i, 1:i) ) <= 0 )
isposdef = false;
break;
end
end
isposdef       % 0 if false, 1 if true
```

# Maple

The following commands in Maple tests if a matrix is positive definite:

```M := <<-6, 12, 2.4, 0>|<-1, 2, 10.4, 1>|<3.25, 1, -1.8, 14.8>|<10.25, 0, 2, 1.2>>;
LinearAlgebra[IsDefinite]( M );
```

For more help on either of these routines or on the LinearAlgebra package, enter:

```?LinearAlgebra
?LinearAlgebra,IsDefinite
```