Skip to main content

Positive Definite Matrices

Say we have a n×nn\times n matrix AA then AA is Positive Definite Matrix if any of the below condition is satisfies,

info

1.1. All the eigenvalues are positive.

note

λ1>0,λ2>0,,λn>0\quad\lambda_1\gt 0,\lambda_2\gt 0,\cdots,\lambda_n\gt 0

info

2.2. All leading determinants are positive.

note

For Example:
Say we have a 3×33\times 3 matrix AA
A=[a11a12a13a21a22a23a31a32a33]A=\begin{bmatrix} a_{11} & a_{12} & a_{13}\\ a_{21} & a_{22} & a_{23}\\ a_{31} & a_{32} & a_{33}\\ \end{bmatrix}
AA is a Positive Definite Matrix if,
\quad
det([a11])>0;\text{det}\left( \begin{bmatrix} a_{11} \end{bmatrix} \right)\gt 0;\quad
\quad
det([a11a12a21a22])>0;\text{det}\left( \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \\ \end{bmatrix} \right)\gt 0;\quad
\quad
det([a11a12a13a21a22a23a31a32a33])>0\text{det}\left( \begin{bmatrix} a_{11} & a_{12} & a_{13}\\ a_{21} & a_{22} & a_{23}\\ a_{31} & a_{32} & a_{33}\\ \end{bmatrix} \right)\gt 0

info

3.3. All pivots are positive.

info

4.4. A n×nn\times n matrix say AA is Positive Definite Matrix, if

danger
xTAx>0;xRn\0\begin{matrix} \vec{x}^TA\vec{x}\gt 0;\quad\forall x\in\mathbb{R}^n \char`\\ \vec{0} \end{matrix}

More interesting properties of positive definite matrices

If a n×nn\times n matrix AA is a positive definite matrix then A1A^{-1} is also positive definite matrix

note

Proof:
Here we can use property number 11 "A matrix is positive definite matrix if all the eigenvalues are positive."
Say that the eigenvalues of AA are λ1,λ2,,λn\lambda_1,\lambda_2,\cdots,\lambda_n
Then the eigenvalues of A1A^{-1} are 1/λ1,1/λ2,,1/λn1/\lambda_1,1/\lambda_2,\cdots,1/\lambda_n
AA is a positive definite matrix, it's eigenvalues are positive, so
λ1>0,λ2>0,,λn>0\lambda_1\gt 0,\lambda_2\gt 0,\cdots,\lambda_n\gt 0

1/λ1>0,1/λ2>0,,1/λn>0\Rightarrow \quad1/\lambda_1\gt 0,\quad1/\lambda_2\gt 0,\cdots,1/\lambda_n\gt 0

So by property 11 we can say that "A1A^{-1} is a Positive Definite Matrix"

Say we have two n×nn\times n positive definite matrix AA and BB then A+BA+B is also positive definite matrix

note

Proof:
Here we can use property number 55
"A matrix (say A) is positive definite matrix if xTAx>0;xRn\0\vec{x}^TA\vec{x}\gt 0;\quad\forall x\in\mathbb{R}^n \char`\\ \vec{0}"
We know that AA is positive definite matrix so xTAx>0;xRn\0\vec{x}^TA\vec{x}\gt 0;\quad\forall x\in\mathbb{R}^n \char`\\ \vec{0}
We know that BB is positive definite matrix so xTBx>0;xRn\0\vec{x}^TB\vec{x}\gt 0;\quad\forall x\in\mathbb{R}^n \char`\\ \vec{0}
For A+BA+B to be positive definite matrix we need

xT(A+B)x>0;xRn\0xT(A+B)x=xTAx(>0;xRn\0)+xTBx(>0;xRn\0)xT(A+B)x>0;xRn\0\vec{x}^T(A+B)\vec{x}\gt 0;\quad\forall x\in\mathbb{R}^n \char`\\ \vec{0} \\ \quad \\ \vec{x}^T(A+B)\vec{x} = \underbrace{\vec{x}^TA\vec{x}}_{(\gt 0;\forall x\in\mathbb{R}^n \char`\\ \vec{0})} + \underbrace{\vec{x}^TB\vec{x}}_{(\gt 0;\forall x\in\mathbb{R}^n \char`\\ \vec{0})} \\ \quad \\ \Rightarrow \vec{x}^T(A+B)\vec{x}\gt 0;\quad\forall x\in\mathbb{R}^n \char`\\ \vec{0} \\

So by property 55 we can say that "A+BA + B is a Positive Definite Matrix"

Say we have a m×nm\times n matrix AA and Rank(A)=n\text{Rank}(A)=n then ATAA^TA is a positive definite matrix

note

Proof:
For ATAA^TA to be a positive definite matrix we need,

xT(ATA)x>0;xRn\0\vec{x}^T(A^TA)\vec{x}\gt 0;\quad\forall x\in\mathbb{R}^n \char`\\ \vec{0}

xT(ATA)x=(xTAT)(Ax)\vec{x}^T(A^TA)\vec{x}=(\vec{x}^TA^T)(A\vec{x})
xT(ATA)x=(Ax)T(Ax)\Rightarrow \vec{x}^T(A^TA)\vec{x}=(A\vec{x})^T(A\vec{x})
Here AxA\vec{x} is a vector in Rn\mathbb{R}^n, so (Ax)T(Ax)=Ax2(A\vec{x})^T(A\vec{x})=\|A\vec{x}\|^2
Ax2\|A\vec{x}\|^2 is the sum of squares so it can't be negative Ax20\|A\vec{x}\|^2\geq 0 and Ax2\|A\vec{x}\|^2 is 00 only for x=0\vec{x}=\vec{0}
because Rank(A)=n\text{Rank}(A)=n so columns are independent, so Ax=0A\vec{x}=\vec{0} if x=0\vec{x}=\vec{0} so it's Null space have only 0\vec{0}
xT(ATA)x>0;xRn\0\Rightarrow \vec{x}^T(A^TA)\vec{x}\gt 0;\quad\forall x\in\mathbb{R}^n \char`\\ \vec{0}
So we can say that "ATAA^TA is a Positive Definite Matrix"


Example 11

Say A=[26619]A=\begin{bmatrix} 2&6\\6&19 \end{bmatrix} check if AA is Positive Definite Matrix or not, using properties described above.
Let's try using the 4th4^{th} property and see if

xTAx>0;xRn\0\vec{x}^TA\vec{x}\gt 0;\quad\forall x\in\mathbb{R}^n \char`\\ \vec{0}

Say x=[x1x2]\vec{x}=\begin{bmatrix} x_1\\x_2 \end{bmatrix}
xTAx=[x1x2][26619][x1x2]\vec{x}^TA\vec{x}= \begin{bmatrix} x_1&x_2 \end{bmatrix} \begin{bmatrix} 2&6\\6&19 \end{bmatrix} \begin{bmatrix} x_1\\x_2 \end{bmatrix}

xTAx=2x12+12x1x2+19x2\vec{x}^TA\vec{x}=2x_1^2+12x_1x_2+19x^2
Now we want to know that is 2x12+12x1x2+19x2>02x_1^2+12x_1x_2+19x^2\gt 0
Now let's use Calculus.

Our function is f(x1,x2)=2x12+12x1x2+19x2f(x_1,x_2)=2x_1^2+12x_1x_2+19x^2
Let's find the critical points,

  • First we take derivative w.r.t. x1x_1.

    f(x1,x2)x1=(2x12+12x1x2+19x2)x1f(x1,x2)x1=4x1+12x2\begin{matrix} \displaystyle \frac{\partial f(x_1,x_2)}{\partial x_1}=& \displaystyle \frac{\partial (2x_1^2+12x_1x_2+19x^2)}{\partial x_1} \\ \displaystyle \frac{\partial f(x_1,x_2)}{\partial x_1}=&\displaystyle 4x_1+12x_2 \end{matrix}

    Now equate f(x1,x2)x1=0\displaystyle \frac{\partial f(x_1,x_2)}{\partial x_1}=0

    4x1+12x2=0(1)\begin{matrix} 4x_1+12x_2=0 \end{matrix} \quad\tag{\color{red}{1}}
  • Now we take derivative w.r.t. x2x_2.

    f(x1,x2)x2=(2x12+12x1x2+19x2)x2f(x1,x2)x2=12x1+38x2\begin{matrix} \displaystyle \frac{\partial f(x_1,x_2)}{\partial x_2}=& \displaystyle \frac{\partial (2x_1^2+12x_1x_2+19x^2)}{\partial x_2} \\ \displaystyle \frac{\partial f(x_1,x_2)}{\partial x_2}=&\displaystyle 12x_1 + 38x_2 \end{matrix}

    Now equate f(x1,x2)x1=0\displaystyle \frac{\partial f(x_1,x_2)}{\partial x_1}=0

    12x1+38x2=0(2)\begin{matrix} 12x_1 + 38x_2=0 \end{matrix} \quad\tag{\color{red}{2}}

    x1=0x_1=0 and x2=0x_2=0 satisfies this system of equations (1) and (2)(1)\text{ and }(2).
    Now we got a point (x1,x2)=(0,0)(x_1,x_2)=(0,0) but we don't know that, Is it minimum, maximum or saddle point.
    To check that, Is it minimum, maximum or saddle point. We need 2nd2^{nd} derivative test

  • 2f(x1,x2)x12\frac{\partial^2 f(x_1,x_2)}{\partial x_1^2}

    2f(x1,x2)x12=(4x1+12x2)x1f(x1,x2)x1=4\begin{matrix} \displaystyle \frac{\partial^2 f(x_1,x_2)}{\partial x_1^2}=& \displaystyle \frac{\partial (4x_1+12x_2)}{\partial x_1} \\ \displaystyle \frac{\partial f(x_1,x_2)}{\partial x_1}=&\displaystyle 4 \end{matrix}
  • 2f(x1,x2)x22\frac{\partial^2 f(x_1,x_2)}{\partial x_2^2}

    2f(x1,x2)x22=(12x1+38x2)x22f(x1,x2)x22=38\begin{matrix} \displaystyle \frac{\partial^2 f(x_1,x_2)}{\partial x_2^2}=& \displaystyle \frac{\partial (12x_1 + 38x_2)}{\partial x_2} \\ \displaystyle \frac{\partial^2 f(x_1,x_2)}{\partial x_2^2}=&\displaystyle 38 \end{matrix}
  • 2f(x1,x2)x1x2\frac{\partial^2 f(x_1,x_2)}{\partial x_1x_2}

    2f(x1,x2)x1x2=(4x1+12x2)x22f(x1,x2)x1x2=12\begin{matrix} \displaystyle \frac{\partial^2 f(x_1,x_2)}{\partial x_1x_2}=& \displaystyle \frac{\partial (4x_1+12x_2)}{\partial x_2} \\ \displaystyle \frac{\partial^2 f(x_1,x_2)}{\partial x_1x_2}=&\displaystyle 12 \end{matrix}

    (Recommended reading)
    Now we have our Hessian matrix (say HH)

    Hf(x1,x2)=[fx12fx1x2fx2x1fx22]Hf(x_1,x_2)=\begin{bmatrix} \displaystyle \frac{\partial f}{\partial x_1^2 } & \displaystyle \frac{\partial f}{\partial x_1x_2}\\ \displaystyle \frac{\partial f}{\partial x_2x_1} & \displaystyle \frac{\partial f}{\partial x_2^2} \end{bmatrix}

    Hf(x1,x2)=[4121238]Hf(x_1,x_2)=\begin{bmatrix} 4&12\\ 12&38 \end{bmatrix}
    det(Hf(x1,x2))>0\text{det}(Hf(x_1,x_2))\gt 0 so it rules out the possibility of being a saddle point, so f(x1,x2)f(x_1,x_2) either have a maximum or a minimum.
    And because 2f(x1,x2)x12>0\displaystyle \frac{\partial^2 f(x_1,x_2)}{\partial x_1^2}\gt 0 so f(x1,x2)f(x_1,x_2) have a minimum values at (0,0)(0,0) and that minimum value is 00

So we had seen that the minimum value of f(x1,x2)=2x12+12x1x2+19x2f(x_1,x_2)=2x_1^2+12x_1x_2+19x^2 is 00
xTAx>0\vec{x}^TA\vec{x}\gt 0 except at x=0\vec{x}=\vec{0}, this means that AA is a Positive Definite Matrix


Example 22

Say A=[2667]A=\begin{bmatrix} 2&6\\6&7 \end{bmatrix} check if AA is Positive Definite Matrix or not, using properties described above.
Let's try using the 4th4^{th} property and see if

xTAx>0;xRn\0\vec{x}^TA\vec{x}\gt 0;\quad\forall x\in\mathbb{R}^n \char`\\ \vec{0}

Say x=[x1x2]\vec{x}=\begin{bmatrix} x_1\\x_2 \end{bmatrix}
xTAx=[x1x2][2667][x1x2]\vec{x}^TA\vec{x}= \begin{bmatrix} x_1&x_2 \end{bmatrix} \begin{bmatrix} 2&6\\6&7 \end{bmatrix} \begin{bmatrix} x_1\\x_2 \end{bmatrix}

xTAx=2x12+12x1x2+7x2\vec{x}^TA\vec{x}=2x_1^2+12x_1x_2+7x^2
Now we want to know that is 2x12+12x1x2+7x2>02x_1^2+12x_1x_2+7x^2\gt 0
Now let's use Calculus.

Our function is f(x1,x2)=2x12+12x1x2+7x2f(x_1,x_2)=2x_1^2+12x_1x_2+7x^2
Let's find the critical points,

  • First we take derivative w.r.t. x1x_1.

    f(x1,x2)x1=(2x12+12x1x2+7x2)x1f(x1,x2)x1=4x1+12x2\begin{matrix} \displaystyle \frac{\partial f(x_1,x_2)}{\partial x_1}=& \displaystyle \frac{\partial (2x_1^2+12x_1x_2+7x^2)}{\partial x_1} \\ \displaystyle \frac{\partial f(x_1,x_2)}{\partial x_1}=&\displaystyle 4x_1+12x_2 \end{matrix}

    Now equate f(x1,x2)x1=0\displaystyle \frac{\partial f(x_1,x_2)}{\partial x_1}=0

    4x1+12x2=0(1)\begin{matrix} 4x_1+12x_2=0 \end{matrix} \quad\tag{\color{red}{1}}
  • Now we take derivative w.r.t. x2x_2.

    f(x1,x2)x2=(2x12+12x1x2+7x2)x2f(x1,x2)x2=12x1+14x2\begin{matrix} \displaystyle \frac{\partial f(x_1,x_2)}{\partial x_2}=& \displaystyle \frac{\partial (2x_1^2+12x_1x_2+7x^2)}{\partial x_2} \\ \displaystyle \frac{\partial f(x_1,x_2)}{\partial x_2}=&\displaystyle 12x_1 + 14x_2 \end{matrix}

    Now equate f(x1,x2)x1=0\displaystyle \frac{\partial f(x_1,x_2)}{\partial x_1}=0

    12x1+14x2=0(2)\begin{matrix} 12x_1 + 14x_2=0 \end{matrix} \quad\tag{\color{red}{2}}

    x1=0x_1=0 and x2=0x_2=0 satisfies this system of equations (1) and (2)(1)\text{ and }(2).
    Now we got a point (x1,x2)=(0,0)(x_1,x_2)=(0,0) but we don't know that, Is it minimum, maximum or saddle point.
    To check that, Is it minimum, maximum or saddle point. We need 2nd2^{nd} derivative test

  • 2f(x1,x2)x12\frac{\partial^2 f(x_1,x_2)}{\partial x_1^2}

    2f(x1,x2)x12=(4x1+12x2)x1f(x1,x2)x1=4\begin{matrix} \displaystyle \frac{\partial^2 f(x_1,x_2)}{\partial x_1^2}=& \displaystyle \frac{\partial (4x_1+12x_2)}{\partial x_1} \\ \displaystyle \frac{\partial f(x_1,x_2)}{\partial x_1}=&\displaystyle 4 \end{matrix}
  • 2f(x1,x2)x22\frac{\partial^2 f(x_1,x_2)}{\partial x_2^2}

    2f(x1,x2)x22=(12x1+14x2)x22f(x1,x2)x22=14\begin{matrix} \displaystyle \frac{\partial^2 f(x_1,x_2)}{\partial x_2^2}=& \displaystyle \frac{\partial (12x_1 + 14x_2)}{\partial x_2} \\ \displaystyle \frac{\partial^2 f(x_1,x_2)}{\partial x_2^2}=&\displaystyle 14 \end{matrix}
  • 2f(x1,x2)x1x2\frac{\partial^2 f(x_1,x_2)}{\partial x_1x_2}

    2f(x1,x2)x1x2=(4x1+12x2)x22f(x1,x2)x1x2=12\begin{matrix} \displaystyle \frac{\partial^2 f(x_1,x_2)}{\partial x_1x_2}=& \displaystyle \frac{\partial (4x_1+12x_2)}{\partial x_2} \\ \displaystyle \frac{\partial^2 f(x_1,x_2)}{\partial x_1x_2}=&\displaystyle 12 \end{matrix}

    (Recommended reading)
    Now we have our Hessian matrix (say HH)

    Hf(x1,x2)=[fx12fx1x2fx2x1fx22]Hf(x_1,x_2)=\begin{bmatrix} \displaystyle \frac{\partial f}{\partial x_1^2 } & \displaystyle \frac{\partial f}{\partial x_1x_2}\\ \displaystyle \frac{\partial f}{\partial x_2x_1} & \displaystyle \frac{\partial f}{\partial x_2^2} \end{bmatrix}

    Hf(x1,x2)=[4121214]Hf(x_1,x_2)=\begin{bmatrix} 4&12\\ 12&14 \end{bmatrix}
    det(Hf(x1,x2))<0\text{det}(Hf(x_1,x_2))\lt 0 so (0,0)(0,0) is the saddle point and f(0,0)=0f(0,0)=0.

So we had seen that f(x1,x2)=2x12+12x1x2+19x2f(x_1,x_2)=2x_1^2+12x_1x_2+19x^2 has neither maximum nor minimum point.
(0,0)(0,0) is a saddle point of f(x1,x2)f(x_1,x_2) and f(0,0)=0f(0,0)=0
So xTAx0;xRn\0\vec{x}^TA\vec{x}\ngtr 0 ;\quad\forall x\in\mathbb{R}^n \char`\\ \vec{0} , this means that AA is a not a Positive Definite Matrix