# Comparing matrices

#### matqkks

##### Member
Can we compare matrices?
If A-B>0 is positive definite, can we say A>B?

#### Fernando Revilla

##### Well-known member
MHB Math Helper
Can we compare matrices? If A-B>0 is positive definite, can we say A>B?
If you mean $A>B\Leftrightarrow a_{ij}>b_{ij}$ for all $i,j$, that is not true. Choose for example $A=\begin{bmatrix}{\;\;1}&{-1}\\{-1}&{\;\;2}\end{bmatrix}$ and $B=\begin{bmatrix}{0}&{0}\\{0}&{0}\end{bmatrix}$.

Edit: Or perhaps you take as a definition $A>B$ if and only if $A-B$ is positive definitite and you want to study the properties of $(\mathbb{R}^{n\times n},>)$. Could you specify?

Last edited:

#### matqkks

##### Member
I meant A-B is positive definite.
Don't not mean your first definition.
K

#### Fernando Revilla

##### Well-known member
MHB Math Helper
I meant A-B is positive definite. Don't not mean your first definition.
I know that you meant $A-B$ definite positive, but the problem is that I don't understand the exact meaning of your question.

$(a)$ If you define $A>B$ iff $a_{ij}>b_{ij}$ then, it is false that $A-B$ positive definite iff $A>B$.

$(b)$ If you define $A>B$ iff $A-B$ is definite positive, of course the definition has sense. You get a relation on $\mathbb{R}^{n\times n}$ i.e. a subset of $\mathbb{R}^{n\times n}\times \mathbb{R}^{n\times n}$.

#### Ackbach

##### Indicium Physicus
Staff member
You'd probably want to check transitivity. So, let's say that $A>B$ and $B>C$. Then, by your definition, you'd have that $A-B$ and $B-C$ are both positive definite. From this, can you prove that $A-C$ is positive definite? That would imply that $A>C$, which is what you need for transitivity.

So let's see. By the definition of positive definite, it must be that $\forall z\in\mathbb{R}^{n},$ $z^{T}(A-B)z>0$, and $z^{T}(B-C)z>0$. Adding positives to positives yields that
$$z^{T}(A-B)z+z^{T}(B-C)z>0,$$
and hence
$$z^{T}[(A-B)z+(B-C)z]=z^{T}[A-B+B-C]z=z^{T}[A-C]z>0,$$
as required. Therefore, $A-C$ is positive definite, so $A>C$; you have transitivity, unless I made a mistake somewhere.