The Singular Value Decomposition (SVD) of a matrix is $$A_{m\times n} = U_{m\times m}\Lambda_{m\times n} V_{n\times n}'$$ where $U$ and $V$ are orthogonal matrices and $\Lambda$ has (i, i) entry $\lambda_i \geq 0$ for $i = 1, 2, \cdots , min(m, n)$ and the other entries are zero. Then the left singular vectors $U$ for rows of matrix and right singular vectors $V$ for columns of matrix can be plotted on the same graph called bi-plot.

I'm wondering how to do the SVD of a three dimensional array and plot the singular vectors on the same graph like bi-plot.


  • 1
    $\begingroup$ please do not cross-post. $\endgroup$ – mpiktas Apr 13 '11 at 7:09
  • 1
    $\begingroup$ Could you explain what the analog of matrix multiplication might be for a "three-dimensional array" (presumably, a rank-three array requiring three independent indexes)? $\endgroup$ – whuber Apr 13 '11 at 14:28

There are several notions of decomposition of such a tensor. Last year I asked essentially the same question on the MaplePrimes site, answered it myself by referring to wikipedia, and provided an implementation for one of those notions (the CANDECOMP/PARAFAC decomposition) in a follow-up post (applied to decomposing the $3\times m \times n$ tensor given by the R,G,B entries of an image).

| cite | improve this answer | |
  • $\begingroup$ +1 Cool! (BTW, the links to the MaplePrimes site are returning a 404.) $\endgroup$ – whuber Apr 13 '11 at 15:56
  • $\begingroup$ @whuber: there was a temporary outage - I believe the links should work again. $\endgroup$ – Erik P. Apr 13 '11 at 18:41
  • $\begingroup$ Thanks. The site's a little slow but it's working now. I like the image examples. $\endgroup$ – whuber Apr 13 '11 at 19:49
  • $\begingroup$ Nice. Any idea about plotting the singular vectors. Thanks $\endgroup$ – MYaseen208 Apr 15 '11 at 0:57
  • $\begingroup$ @MYaseen208: I think you can do the same as with a regular SVD - create points $(d_1^\alpha u_{1i}, d_2^\alpha u_{2i})$, $(d_1^\alpha v_{1i}, d_2^\alpha v_{2i})$, $(d_1^\alpha w_{1i}, d_2^\alpha w_{2i}$ for $i = 1, \dotsc, n$, where $u_1, v_1, w_1$ are the 1st triple of "singular" vectors and $d_1$ the 1st singular value - similar for 2nd. (I had to look biplots up - hadn't seen them before.) By the way - I think you'd potentially get a more powerful (3D) graph if you include the third singular vector as a third coordinate... $\endgroup$ – Erik P. Apr 15 '11 at 2:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.