We call a matrix $M \in \mathbb{R}^{d \times d}$ transitive if it satisfies the following:   




> 
> For any three vectors $u, v, w$ in $\mathbb{R}^d$. If $u^T M v > 0$ and $v^T M w > 0$ then $u^TMw > 0$. 
> 
> 
> 


**EDIT**: The case when $d = 1$ is simple. For $d > 1$ the following is true:   



a) M must be Positive Semi Definite, because if $M$ is transitive and $\exists u$ s.t. $u^TMu < 0$ then we can let $v = -u, w = u$ and arrive at the contradiction that $u^t M u < 0 \implies u^tMv > 0, v^tMw > 0 \implies u^TMw > 0 \implies u^TMu > 0$


b) $M \ne I$ because if $M = I$ then we just need to construct three vectors such that $u^Tv > 0, v^Tw > 0$ but $u^Tw < 0$. Intuitively, I know that sum of two acute angles can be obtuse.


c) More generally, $M$ can not be full rank positive definite because then the factors in the Cholesky decomposition $LL^T$ of $M$ would also be full rank and the problem could be reduced to case b) by change of basis using $L$.


Now I am stuck in the space of low rank positive semidefinite matrices. Is there a way to characterize such matrices further? Can such a matrix even exist, apart from zero matrix?



> 
> **EDIT2:** The deduction that $M$ is PSD in step a) implicitly assumed that $M$ is symmetric. [Keith Kearnes' answer](https://mathoverflow.net/a/212773/29887) explicitly shows that $M$ must be rank 1 in that case. ~~The case when $M$ is anti-symmetric is open but I doubt it would be possible to prove anything in that case. I will wait a few days to get more answers.~~ Thanks.  
> 
> **EDIT3:** [Darij Grinberg's answer](https://mathoverflow.net/a/212808/29887) proved that every transitive matrix must be symmetric. This completed the characterization.
> 
> 
> 



Existence and characterization of transitive matrices?
I assume from the wording of the question (positive semidefinite, Cholesky decomposition) that you intend $M$ to be symmetric. Write $M$ as $N^TN$ and let $V\leq \mathbb R^d$ be the range of $N$. For $u, v, w\in \mathbb R^d$ let $x=Nu, y=Nv, z= Nw$. Then your condition reduces to 
$$
x^Ty>0 \;\&\; y^Tz>0 \Rightarrow x^Tz>0$$ 
on $V$. If the dimension of $V$ is 2 or more, then (as you observed in your last sentence under your item (b)) it is possible to contradict this. That is, it is possible to find $x, y, z$ in the same plane in $V$ such that the angles between $x$ and $y$ and between $y$ and $z$ are acute, while the angle between $x$ and $z$ is obtuse. Once they are known, you can solve for $u, v, w$ which contradict the original condition.


On the other hand, if the dimension of $V$ is 1, there is no contradiction. In this case, $N$ is $1\times d$, so $u^TN^T = Nu$ is a real number, $u^TN^TNv = (Nu)(Nv)$, and you can argue that if 
$(Nu)(Nv) > 0$ and $(Nv)(Nw) > 0$,
then the number $(Nu)(Nw)$ has the same sign as $$(Nu)(Nv)^2(Nw) = [(Nu)(Nv)][(Nv)(Nw)] > 0.$$
The condition that the dimension of $V$ is 1 is that $N$ (and $M$) have rank $1$.


So, the answer for symmetric $M$ is: $M$ is positive semidefinite of rank at most $1$.


