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.

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

I have found the following ellipse representation $(x,y)=(x_0\cos(\theta+d/2),y_0\cos(\theta-d/2))$, $\theta \in [0,2\pi]$. This is a contour of bivariate normal distribution with uneven variances and correlation $\rho=\cos(d)$. I know that this is a rotated ellipse with centre $(0,0)$. How to find the lengths of major and minor axes and the angle between x-axis and major axis?

share|cite|improve this question
up vote 6 down vote accepted

The semi-major axis will be the distance from the origin to the farthest point on the ellipse. So $r^2=x_0^2\cos^2(\theta+d/2)+y_0^2\cos^2(\theta-d/2)$. As $r^2$ is a monotonic function of $r$, you can maximize it instead, which simplifies things a bit. The angle between the $X$ axis and the major axis will then be the arctangent of $y/x$ at this maximum point. The semi-minor axis will be the distance from the origin to the closest point on the ellipse, and will be $\pi/2$ away from the semi-major axis.

share|cite|improve this answer

This formula rescales a standard ellipse $(\cos(\theta + d/2), \cos(\theta - d/2))$ (inscribed within the unit square) by the diagonal matrix $(x_0, y_0)$. By symmetry, the values $\theta = 0$ and $\theta = \pi/2$ correspond to vertices of this standard ellipse, allowing us to find their coordinates (and thus the lengths of the semi-axes), whence we easily deduce its equation is $x^2 + y^2 - 2 \rho x y = 1 - \rho^2$. Applying the diagonal matrix gives the conventional implicit form

$$\left(\frac{x}{x_0}\right)^2 + \left(\frac{y}{y_0}\right)^2 - 2 \rho \frac{x}{x_0} \frac{y}{y_0} = 1 - \rho^2 \text{.}$$

From here you can look up anything you want.

share|cite|improve this answer
+1, also good answer, but you need to know about the parametrisation of the ellipse inscribed in unit square. Now I know a lot about it :) What had me confused though it is obvious that $\theta=0$ and $\theta=\pi/2$ will not give the major and minor axes vertices if $x_0\neq y_0$. This will not teach me again that it is dangerous to do math when tired. – mpiktas Dec 24 '10 at 11:57
@mpiktas The symmetry of the unit square (under transposing $x$ and $y$) implies the equation of an inscribed ellipse must be in the form $x^2 + y^2 + 2 B x y = F$. Setting $\theta = d/2$ locates $(\rho, 1)$ on the ellipse and setting $\theta = 0$ locates $(\cos(d/2), \cos(d/2))$ on it. These give two linear equations for $F$ and $B$, etc. ... I do appreciate the difficulties of doing math when one is tired... – whuber Dec 24 '10 at 17:56

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.