# Proving a specific matrix is positive definite.

I am trying to prove the following matrix is positive definite:

Let $$A$$ be a $$n\times n$$ real positive definite matrix, so it holds that $$A = UDU^T$$ where

$$D=diag(d_{11},d_{22},\ldots,d_{nn}) > 0$$

For any $$n\times1$$ vector $$w$$, let $$q = U^Tw$$, $$q$$ is also $$n\times1$$ vector, so define the matrix

$$B = Aww^TA + (w^TAw)A - 2UD^*U^T$$ where $$D^*$$ is a diagnoal matrix and $$\{D^*\}_{ii} = (d_{ii}q_{i})^2$$. I want to prove $$B$$ is positive definite.

I used that $$A = UDU^T$$ to rewrite

$$B = UDqq^TDU - UD^*U^T + U(D\cdot(q^TDq))U^T - UD^*U^T$$

The eigenvector $$U$$ doesn't affect positive definite so I omitted it.

The first part $$Dqq^TD-D^*$$: provides non-diagonal elements.

The second part $$D\cdot(q^TDq) - D^*$$ provides diagonal elements.

Than I need to prove all eigenvalues of $$Dqq^TD-D^* + D\cdot(q^TDq) - D^*$$ are positive and I'm stuck at this point. Am I wrong?

Does $$B$$ really positive definite ? (I think it's because I tryed a lot of simulations with no conflicts)

Thank you so much for any suggestions.

• How certain are you this statement is a correct one? As a trivial counterexample, say $n = 1$, take $A = 1$, $w = 1$, then $B = 0$. Is it positive definite? Jun 23, 2021 at 20:17
• yes, this should be semi-positive definite. Jun 24, 2021 at 9:34

It is not necessarily positive definite (such as when $$D=I_2$$ and $$q=(1,0)^T$$), but it is always positive semidefinite: for any vector $$v$$, let $$x=D^{1/2}q$$ and $$y=D^{1/2}v$$. Then \begin{aligned} &v^T\left(Dqq^TD+(q^TDq)D-2D^\ast\right)v\\ &=(v^TDq)^2+(q^TDq)(v^TDv)-2v^TD^\ast v\\ &=\left(\sum_ix_iy_i\right)^2+\left(\sum_ix_i^2\right)\left(\sum_iy_i^2\right)-2\sum_ix_i^2y_i^2\\ &=\left(\sum_ix_i^2y_i^2+2\sum_{i
• @guanglinhuang Whether $D$ has distinct eigenvalues is unimportant. E.g. when $q=\pmatrix{1\\ 2}$ and $D=\pmatrix{4&0\\ 0&1}$, we have $Dqq^TD+(q^TDq)D-2D^\ast=\pmatrix{16&8\\ 8&4}$, which is singular. You can always absorb the diagonal elements of $D$ into $q$ and $v$ and assume that $D=I$. Jun 24, 2021 at 11:58