Finding the long and short axes of an ellipses after applying an anisotropic scaling Suppose I have an ellipse with long axis $l_1$, short axis $s_1$ and say it has an orientation of $\frac{\pi}{2}$ (unnecessary but the graphic I remembered after I created the graphic attached that the usual convention is to have the long axis aligned to the x-axis).

Now suppose I apply an anisotropic scaling (scaling along two orthogonal axes); specifcally I scale by some factor $k_1$ in the direction of some vector $\vec{v}_1$ and by some other factor $k_2$ in the direction of a vector $\vec{v}_2$ that is orthogonal to $\vec{v}_1$. For non-trivial values such scaling maps an ellipse to an ellipse.
Given the directions of $\vec{v}_1$ and $\vec{v}_2$, the scaling factors $k_1$ and $k_2$ and the original ellipse parameters $l_1,s_1$ and $\theta_1$ (for completeness - its orientation relative to the x-axis / angle between long axis and x-axis), what are the new long and short axes -  $l_1'$ and $s_1'$ respectively?

Initial attempt:
Assuming it to be centered at the origin, I applied the transformations to the ellipse parameterization and then sought out to transform that parameterization to some form $(l_1' \cos(t)\cos(\theta_1') - s_1' \sin(t)\cos(\theta_1'),l_1' \cos(t)\sin(\theta_1') + s_1' \sin(t)\sin(\theta_1'))$ where $\theta_1'$ is the angle $l_1'$ makes with the x-axis.
This turns out to be nearly impossible or at least way above what I'm seeking, since there are so many variables involved.
I also thought of finding the max of the ellipse parameterization after applying the transformations, however also not exactly straight forward since it depends on the scaling factors and directions - but could be numerically achievable I suppose when one provides specific scaling factors and directions. However, I'm not seeking a numerical solution.
So is there a straightforward analytic way to find the long and short axis of the transformed ellipse?
Thanks in advance!
 A: The equation of the starting ellipse (assuming it is centered at the origin) can be written as
$ r^T Q r  = 1 $
where $ r =[x, y]^T $
If the semi-axes are $a$ and $b$ with $a \gt b$, and assuming the orientation of the major axis is parallel to the y-axis then
$Q = \begin{bmatrix} \dfrac{1}{b^2} && 0 \\ 0 && \dfrac{1}{a^2} \end{bmatrix} $
Now you want to apply scaling to the points $r$
along a certain given pair of orthogonal unit vectors $v_1$ and $v_2$ such that the component of $r$ along
$v_1$ get stretched by $k_1$ and the component of $r$ along $v_2$ gets stretched by $k_2$
The components of $r$ onto $v_1$ and $v_2$ are easily computed by defining
$R = [v_1, v_2] $
Then the components (the coordinates) of $r$ with respect to $v_1 $ and $v_2$ are given by
$r_1 = R^T r $
Next we want to stretch the two entries of $r_1$ by $k_1$ and $k_2$ respectively, so define the diagonal matrix $D$, as follows
$D = \begin{bmatrix} k_1 && 0 \\ 0 && k_2 \end{bmatrix}$
then it would follow that the stretched coordinates are given by $r_2$ where:
$ r_2 = D r_1 = D R^T r $
The image of $r$ is not $r_2$ but $ R r_2 $
i.e.
$r' = R D R^T r  = A r $
Having found the image $r'$ of a point $r$ on the ellipse, we can write the equation of the new ellipse.
We have $ r = A^{-1} r' = R D^{-1} R^T r' $
substitute this into the equation of the original ellipse, to obtain,
$ r'^T R D^{-1} R^T Q R D^{-1} R^T r' = 1 $
Define $Q' = R D^{-1} R^T Q R D^{-1} R^T$
then the equation of the new ellipse is
$ r'^T Q' r' = 1 $
To obtain the semi-major and semi-minor axes lengths, we have to perform diagonalization of $Q'$ into
$Q' = R' D' R'^T $
Then the diagonal matrix $D'$ is of the form
$D' = \begin{bmatrix} \dfrac{1}{a'^2} && 0 \\ 0 && \dfrac{1}{b'^2} \end{bmatrix} $
Now $a'$ and $b'$ are the sought lengths of the semi-major and semi-minor axes.  The directions of these axis are stored respectively in the matrix $R'$
A: I can suggest two different strategies.

*

*Choose at will five points on the original ellipse and apply to them the anisotropic scaling. The transformed points define a conic which is then the transformed of the ellipse. From them you can get the equation of the new ellipse and then its axes.


*From the center of the original ellipse trace a line parallel to $\vec v_1$, intersecting the ellipse at diameter $AB$. Construct then the conjugate diameter $CD$ (i.e. tangents at $C$ and $D$ are parallel to $\vec v_1$).
The transformed segments $A'B'$ and $C'D'$ are conjugate diameters of the transformed ellipse, and you can then find its axes as explained here.
