Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Given a diagonal matrix $X$, what is the best way to factor it using two vectors as $X=u \cdot v^T$? How do we find such vectors $u$ and $v$ for a diagonal matrix $X$?

share|cite|improve this question
The only diagonal matrices that can be factored as the (outer) product of two vectors are those that have at most one nonzero element. In that case, you can use $(0,\ldots,0,1,0,\ldots,0)$ and $(0,\ldots,0,c,0,\ldots,0)$. – Henning Makholm Jan 25 '12 at 1:22
@PZZ, This approach would not lead to the off-diagonal elements being zero, as I define X as a diagonal matrix. – user23600 Jan 25 '12 at 4:06
@pvep: Do you say you define a diagonal matrix to be one of the form $u \cdot v^T$? Please don't, every calls a diagonal matrix one with nonzero entries only on the diagonal. Matrices of the form $u \cdot v^T$ are called rank-$1$ matrices. – Marc van Leeuwen Jan 25 '12 at 8:45

1 Answer 1

up vote 2 down vote accepted

If a diagonal matrix $D=\operatorname{diag}(\lambda_1,\ldots,\lambda_n)$ can we written as $u\cdot v^T$, with $u=(u_1,\ldots,u_n)^T$ and $v=(v_1,\ldots,v_n)^T$, and if $\lambda_i\neq 0$ and $\lambda_k\neq 0$ for two distinct $i,k\in\{1,\ldots,n\}$, then $u_iv_i\neq 0$ and $u_kv_k\neq 0$. So $u_i,v_i,u_k,v_k$ are different from $0$, and so is for example $u_iv_k$. In particular $u\cdot v^T$ is not diagonal.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.