Definite matrix: Difference between revisions

Content deleted Content added
Consistency between real and complex definitions: fixing error in the preceding edit
Examples: further fix
Line 172:
== Examples ==
{{unordered list
| The [[identity matrix]] <math>I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}</math> is positive-definite (and as such also positive semi-definite). It is a real symmetric matrix, and, for any non-zero column vector '''z''' with real entries ''a'' and ''b'', one has
<math display="block"> \mathbf{z}^\top I\mathbf{z} = \begin{bmatrix} a & b \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} a \\ b \end{bmatrix} = a^2 + b^2.</math>
Seen as a complex matrix, for any non-zero column vector ''z'' with complex entries ''a'' and ''b'' one has
<math display="block">\mathbf{z}^*I\mathbf{z} = \begin{bmatrix} \overline{a} & \overline{b} \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} a \ b\end{bmatrix} = \overline{a}a + \overline{b}b = |a|^2 + |b|^2.</math>
Either way, the result is positive since <math>\mathbf z</math> is not the zero vector (that is, at least one of <math>a</math> and <math>b</math> is not zero).
| The real symmetric matrix
<math display="block">M = \begin{bmatrix} 2 & -1 & 0 \\ -1 & 2 & -1 \\ 0 & -1 & 2 \end{bmatrix}</math>
is positive-definite since for any non-zero column vector '''z''' with entries ''a'', ''b'' and ''c'', we have
<math display="block">\begin{align}
\mathbf{z}^\top M \mathbf{z} = \left( \mathbf{z}^\top M \right) \mathbf{z}
&= \begin{bmatrix} (2a - b) & (-a + 2b - c) & (-b + 2c) \end{bmatrix}
\begin{bmatrix} a \\ b \\ c \end{bmatrix} \\
&= (2a - b)a + (-a + 2b - c)b + (-b + 2c)c \\
&= 2a^2 - ba - ab + 2b^2 - cb - bc + 2c^2 \\
Line 192:
 
This result is a sum of squares, and therefore non-negative; and is zero only if <math>a = b = c = 0,</math> that is, when <math>\mathbf{z}</math> is the zero vector.
| For any real [[invertible matrix]] <math>A,</math> the product <math>A^\top A</math> is a positive definite matrix (if the means of the columns of A are 0, then this is also called the [[covariance matrix]]). A simple proof is that for any non-zero vector <math>\mathbf{z},</math> the condition <math>\mathbf{z}^\top A^\top A\mathbf{z} = (A\mathbf{z})^\top (A\mathbf{z}) = \|A\mathbf{z}\|^2 > 0,</math> since the invertibility of matrix <math>A</math> means that <math>A\mathbf{z} \neq 0 ~.</math>
| The example <math>M</math> above shows that a matrix in which some elements are negative may still be positive definite. Conversely, a matrix whose entries are all positive is not necessarily positive definite, as for example
<math display="block">N = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix},</math>
for which <math>\begin{bmatrix} -1 & 1 \end{bmatrix}N\begin{bmatrix} -1 & 1 \end{bmatrix}^\top = -2 < 0 ~.</math>
}}