Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Loading [MathJax]/jax/output/CommonHTML/jax.js
Skip to content

Surfaces of n-dimensional ellipsoids – I – quadratic form and matrix equation

Multidimensional ellipsoids are mathematically interesting figures per se. But there is a reason why they sometimes also appear in the context of Machine Learning experiments. One reason is that Multivariate Normal Distributions [MND] often describe the statistical distributions of properties which characterize natural objects we investigate by ML-methods. And the locations of constant probability density of MNDs are surfaces of multidimensional ellipsoids.

MNDs and ellipsoids may therefore appear in data distributions in diverse variable spaces which we use in ML to describe objects. E.g., the original variable space of training data, but also in abstract internal or latent variable spaces of e.g. Autoencoders.

This post shortly discusses the quadratic mathematical equation for vector components reaching to the surface of a multidimensional ellipsoid. We look in particular at the equations for centered ellipsoids. By “centered” we mean that the symmetry center of the ellipsoid coincides with the origin of the Euclidean Coordinate System in which we describe ponts and vectors in a n-dimensional variable space. The equations of a 2-dimensional ellipse and a 3-dimensional ellipsoid are briefly discussed.

Level of this post series: Advanced. Knowledge of Linear Algebra is required.

Euclidean coordinate system

We work in an Euclidean Coordinate System of the ℝn. Points in this space have position vectors vv which we write in vertical form

vv=(v1v2vn)=(v1,v2,,vn)T

T symbolizes the transposition operation. A position vector has its starting point fixed at the ECS origin.

Quadratic form for n = 3

The surface of a n-dimensional ellipsoid can be described by an equation for respective components of position vectors to pints on this surface. For n=3 the equation would have the following form for a vector veve=(x,y,z)T :

q(veve)=ax2+by2+cz2+dxy+exz+fyz+gx+hy+iz+j=0

An equation of this form not only describes an ellipsoid. Its coefficients have to fulfill certain conditions. We summarize these conditions below as a requirement a certain matrix has to fulfill.

The image below show surfaces of three nested ellipsoid described by a general quadratic equation:

If the ellipsoid is centered then we get only quadratic terms:

αx2+βy2+γz2+δxy+ϵxz+ηyz=1

We have incorporated the constant term into the coefficients. This can be rewritten as a matrix equation:

qA(veve)=(x,y,z)AAq(xyz)=1,with
AAq=(αδϵδβηϵηγ)

Note that the matrix AA is a real-value symmetric (3×3)-matrix! Any such matrix has an eigenvalue decomposition. See the next post for more details.

An important property the matrix must fulfill to really describe a 3-dimensional ellipsoid and not another type of figure is:

det(AAq)>0

Note also that though centered the ellipsoid described by a general quadratic equation still will be rotated against some or all coordinate axes. I.e. the principal axes of the ellipsoid may not be aligned with the ECS axes.

Quadratic form for a non-centered n-dimensional ellipsoid

The formulas above can be generalized to n dimensions. If the center of a non-centered ellipsoid is given by a position vector ψψ then the formula for vectors veve to its surface can be written as

q(veveψψ)=(veveψψ)TAAC(veveψψ)=C
q(veveψψ)=veveTAACveve2veveTAACψψ+ψψTAACψψ=C.

Equation for a centered n-dimensional ellipsoid

For a centered n-dimensional ellipsoid equation (2) reduces to

q(veve)=veveTAACveve=C,withC>0.

Without loss of generality we can again put the C into the matrix coefficients.

qA(veve)=veveTAAqveve=1((

Again, we deal with a real-valued, symmetric matrix. And we demand

det(AAq)>0

Note that his condition makes the matrix invertible.

Mapping matrix coefficients to the equation coefficients for n = 3

The general expression we have found for a non-centered ellipsoid can for n=3 be related to the coefficients of the respective quadratic form by :

veve=(xyz),AA=(ad/2f/2d/2be/2f/2e/2c),ψψ=AA1(g/2h/2i/2),C=ψψTAAψψj

Axis-parallel ellipsoid as a special case

For n=2 and n=2 many readers may have got acquainted with an ellipsoid by an equation like

n=2:x2r21+y2r22=1n=3:x2r21+y2r22+z2r23=1

with principal axes r1,r2 and r1,r2,r3 respectively, of an ellipsoid. The difference is that in this case the ellipsoid is not only centered, but its principal axes are also aligned with the axes of the ECS. This corresponds to a diagonal form of the matrix AAq :

AAq=(1/r210001/r220001/r23)

The matrix coefficients here have a direct geometrical interpretation.

Diagonal matrices? Orientation of an ellipsoid?

Two questions arise:

  • How can we build a general rotated ellipsoid starting with a diagonal form in 3- and in n-dimensional spaces?
  • When a general matrix AAq is given: By what kind of operation do we get a corresponding diagonal matrix describing the lengths of the principal axes? And how do we get an information about the orientation of an ellipsoid from AAq?

These are topics of the next posts in this series.

Conclusion

Vectors to the surfaces of centered and non-centered n-dimensional ellipsoids are described by an equation comprising quadratic terms of the vector components. Such an equations can be written in vector form with a symmetric and invertible matrices AAq. In the next post of this series I will discuss how to get information about geometrical properties of a centered ellipsoid from the coefficients of AAq.