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.

  • $\begingroup$ 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? $\endgroup$
    – Zhanxiong
    Jun 23, 2021 at 20:17
  • $\begingroup$ yes, this should be semi-positive definite. $\endgroup$ Jun 24, 2021 at 9:34

1 Answer 1


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<j}x_iy_ix_jy_i\right) +\left(\sum_ix_i^2y_i^2+\sum_{i<j}(x_i^2y_j^2+x_j^2y_i^2)\right) -2\sum_ix_i^2y_i^2\\ &=2\sum_{i<j}x_iy_ix_jy_i+\sum_{i<j}(x_i^2y_j^2+x_j^2y_i^2)\\ &=\sum_{i<j}(x_iy_j+x_jy_i)^2\\ &\ge0. \end{aligned}

  • $\begingroup$ Thank you so much, this is correct. I stuck in the second step. An additional question is that when D has distinct eigenvalues, would B be positive definite? $\endgroup$ Jun 24, 2021 at 9:43
  • $\begingroup$ @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$. $\endgroup$
    – user1551
    Jun 24, 2021 at 11:58
  • $\begingroup$ Thank you so much, it really helps me a lot! $\endgroup$ Jun 24, 2021 at 20:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .