Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here are two n-dimensional vectors: $V_1$ and $V_2$

$V_1 (v_1,v_2, \dots ,v_n)$

$V_2 (v_1,v_2, \dots ,v_n)$

$V_1 \cos(\theta) + V_2 \sin(\theta)$ is an ellipse in the $n$-D space. (Its center is the origin.)

I want to find the directions and magnitudes of the major and minor axes.

I have a $2$-D example here: Ellipse with non-orthogonal minor and major axes?

People used SVD to find the minor and major axes of that $2$-D example, but I'm not familiar with SVD. So I'm having problem extending it to $n$-dimension or arbitrary $V_1$ and $V_2$.

Could anybody give a formula for it? Thank you very much in advance!

share|cite|improve this question
It's still possible to compute the singular value decomposition of the matrix whose columns are your two vectors; the singular values will then correspond to the two axes. – J. M. Aug 23 '12 at 17:52
up vote 2 down vote accepted

For example, let's take the 3-dimensional vectors $$ V_1 = \pmatrix{1\cr 2\cr 1\cr},\ V_2 = \pmatrix{3\cr -3\cr 2\cr} $$ With these as columns we form the matrix $$A = \pmatrix{1 & 3\cr 2 & -3\cr 1 & 2\cr}$$ Now $$ A A^T = \pmatrix{1 & 3\cr 2 & -3\cr 1 & 2\cr} \pmatrix{1 & 2 & 1\cr 3 & -3 & 2\cr} = \pmatrix{10 & -7 & 9\cr -7 & 13 & 0\cr 9 & 0 & 13\cr}$$ which has eigenvalues $23, 13, 0$ corresponding to normalized eigenvectors $$ W_1 = \frac{1}{\sqrt{230}} \pmatrix{10\cr -7 \cr 9\cr},\ W_2 = \frac{1}{\sqrt{130}} \pmatrix{0 \cr 9\cr 7\cr},\ W_3 = \frac{1}{\sqrt{299}} \pmatrix{13\cr 7\cr -9\cr} $$ Note that these are orthogonal since $A A^T$ is symmetric. The major and minor axes have lengths $\sqrt{23}$ and $\sqrt{13}$ (the singular values, which are the square roots of the nonzero eigenvalues of $A A^T$) and directions $W_1$ and $W_2$ respectively.

share|cite|improve this answer
Thank you so much. So for n-dimensional space (where n>3), Is it possible that we get more eigenvalues? Do we always pick the first two eigenvalues and corresponding eigenvectors as major and minor axes? – Hi271 Aug 24 '12 at 1:55
If we're talking about an ellipse, $A$ has rank $2$, so $A A^T$ has rank $2$, and there are only $2$ nonzero eigenvalues. The largest eigenvalue gives you the major axis and the second gives you the minor axis. – Robert Israel Aug 24 '12 at 5:36
Thank you very much! I get it. – Hi271 Aug 24 '12 at 14:57

Your Answer


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

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