Principal Axis

Author

Eric W. Weisstein
August 14, 2026

This notebook downloaded from https://mathworld.wolfram.com/notebooks/LinearAlgebra/PrincipalAxis.nb.

For more information, see Eric's MathWorld entry https://mathworld.wolfram.com/PrincipalAxis.html.

©2026 Wolfram Research, Inc. except for portions noted otherwise

Illustration

The dashed blue eigenvector directions are the principal axes of the rotated ellipse.

Module[{angle,axisColor,neutral,principal1,principal2,rotation},neutral=LightDarkSwitched[Black,White];axisColor=Blue;angle=(π/6);rotation=RotationMatrix[angle];principal1=rotation.{1,0};principal2=rotation.{0,1};Graphics[{Directive[neutral,AbsoluteThickness[1.5]],Line[{{-(13/5),0},{(13/5),0}}],Line[{{0,-(9/5)},{0,(9/5)}}],Directive[neutral,AbsoluteThickness[2.5]],GeometricTransformation[Circle[{0,0},{2,1}],rotation],Directive[axisColor,AbsoluteThickness[2],Dashing[{0.025,0.018}]],Line[{-((12 principal1)/5),((12 principal1)/5)}],Line[{-((7 principal2)/5),((7 principal2)/5)}],Text[Style[(Subscript[q, 1]),18,axisColor,FontFamily->"Times"],((13 principal1)/5)],Text[Style[(Subscript[q, 2]),18,axisColor,FontFamily->"Times"],((8 principal2)/5)],Text[Style["x",16,neutral,FontFamily->"Times"],{(14/5),0}],Text[Style["y",16,neutral,FontFamily->"Times"],{0,2}]}]]