Given a sufficient number of linearly independent points on an ellipsoid's surface, compute the surface's equation in a specific style and normalized in specific manner. The answer is the sum of the equation's coefficients.
For three dimensions, nine linearly independent points are required. The reason will be explained in the solution, which will use matrix algebra for a more compact presentation. Now, the points, with each row being the coordiantes of a point: ⎝ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎛ − 4 − 3 − 3 − 2 − 1 1 3 6 6 3 − 1 4 1 0 4 − 1 2 3 1 9 8 0 6 1 2 5 4 9 3 1 9 + 5 7 6 6 0 1 9 8 0 6 1 2 5 1 1 5 5 3 5 + 3 9 6 1 2 1 9 8 0 6 6 3 8 2 2 − 2 5 0 2 7 5 1 5 1 9 8 0 6 5 0 6 1 6 − 3 7 5 3 7 1 6 7 1 9 8 0 6 2 5 0 8 8 9 0 7 + 4 7 0 9 4 1 9 8 0 6 6 9 1 0 2 − 7 5 0 1 0 9 7 9 1 9 8 0 6 1 2 5 2 0 2 7 0 3 + 4 7 5 3 2 1 9 8 0 6 2 0 0 0 3 7 4 + 6 6 0 1 8 1 9 8 0 6 7 0 8 6 0 − 1 2 5 1 0 2 1 1 9 ⎠ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎞ .
In plain text: {{-4, 3, (57660 + 125 Sqrt[49319])/19806}, {-3, -1, (39612 + 125 Sqrt[115535])/19806}, {-3, 4, (63822 - 250 Sqrt[27515])/19806}, {-2, 1, (50616 - 375 Sqrt[37167])/19806}, {-1, 0, (47094 + 250 Sqrt[88907])/19806}, {1, 4, (69102 - 750 Sqrt[10979])/19806}, {3, -1, (47532 + 125 Sqrt[202703])/19806}, {6, 2, (66018 + 2000 Sqrt[374])/19806}, {6, 3, (70860 - 125 Sqrt[102119])/19806}}
Here is an image of the ellipsoid:
Here is a second, example ellipsoid's points: ⎝ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎛ 1 1 1 2 2 2 2 3 3 1 3 3 0 1 2 3 1 1 6 6 0 0 7 2 3 3 7 5 7 0 2 2 5 6 2 + 3 2 1 7 7 6 0 6 6 0 0 7 2 3 − 2 8 9 0 4 2 1 9 1 9 3 − 1 1 3 2 7 6 8 6 6 0 0 7 2 3 2 8 9 0 4 2 1 9 1 9 3 − 1 1 3 2 7 6 8 6 6 0 0 7 2 3 2 1 7 5 2 6 4 − 4 3 3 5 0 4 8 1 2 0 6 2 2 0 0 2 4 1 7 2 2 5 6 6 0 0 7 2 3 − 4 3 3 5 0 4 8 1 2 0 6 − 2 1 7 5 2 6 4 6 6 0 0 7 2 3 2 1 6 7 5 1 0 9 8 5 7 3 − 4 3 5 0 5 2 8 6 6 0 0 7 2 3 − 3 7 5 7 0 2 2 5 6 2 − 3 2 1 7 7 6 0 6 6 0 0 7 2 3 3 7 5 7 0 2 2 5 6 2 − 3 2 1 7 7 6 0 ⎠ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎞ .
The specific style is all terms on the left hand side of the equation, the right hand side is 0, and each term is a coefficient and a product of variables. The normalization is that fractions are cleared by multiplying both sides of the equation by the least common multiple of the denominators so that there are no longer any fractions. Then, the resultant coefficients are reduced by dividing both sides of the equation by the greatest common divisor . Finally, enter the absolute value of the sum. Note well, that the right hand side of the equation stays zero during the normalizations.
Here is an example of the style and normalizations using the second, example ellipsoid: 6 5 0 2 5 6 3 6 7 3 x 1 2 + 6 1 4 1 2 5 1 6 3 0 7 2 x 2 x 1 + 1 8 4 2 3 7 5 7 5 7 1 2 x 3 x 1 − 5 5 2 7 1 2 5 2 3 1 1 6 4 6 8 x 1 + 5 2 2 0 0 6 2 5 6 7 7 3 2 0 9 x 2 2 + 5 2 2 0 0 6 2 5 2 2 0 0 2 4 1 x 3 2 + 5 2 2 0 0 6 2 5 1 4 5 0 1 7 6 x 2 x 3 − 5 2 2 0 0 6 2 5 4 1 2 6 8 6 5 8 x 2 − 1 5 6 6 0 1 8 7 5 1 7 2 2 1 5 6 8 x 3 + 4 6 9 8 0 5 6 2 5 1 6 8 0 8 0 3 1 1 6 = 0 .
The least common multiple of the absolute value of denominators of the left hand side of the equation is 4 6 9 8 0 5 6 2 5 .
After multiplying both sides of the equation by 4 6 9 8 0 5 6 2 5 , the equation becomes: 4 6 0 0 3 7 4 2 5 x 1 2 + 1 2 4 7 5 0 0 8 0 x 2 x 1 + 1 9 3 0 6 5 6 0 x 3 x 1 − 1 9 6 4 8 9 9 7 8 0 x 1 + 6 0 9 5 8 8 8 1 x 2 2 + 1 9 8 0 2 1 6 9 x 3 2 − 3 7 1 4 1 7 9 2 2 x 2 + 1 3 0 5 1 5 8 4 x 2 x 3 − 5 1 6 6 4 7 0 4 x 3 + 1 6 8 0 8 0 3 1 1 6 = 0 .
Since no denominators became − 1 , it is not necessary to clear that denominator by multiplying top and bottom of that term alone by − 1 .
The greatest common divisor of the coefficents of the resultant equation's left hand side is 1 . Therefore, that normalization does not need to be done explicitly.
Adding the coefficients of the terms (including the constant term, of course) and taking the absolute value gives 9 2 7 2 5 9 1 . This is the answer for the for the second, example equation.
2020-10-08T13:19: Material copied from a problem report discussion.
The base problem is to find the equation of the ellipsoid described above. Because of limitations of the Brilliant answering system, the answer is given based on a computation of that equation written in a specific form. Much of the discussion in the problem description is just to get the equation into the necessary form to do the computation.
Here is the discussion from my answer to the problem report from someone who found the original discussion incomprehensible. Brilliant has resolved that report.
I am using homogenous coordinates and matrix algebra to get a more compact notation. The closest that I can get to your form would be "The equation of this ellipsoid can be expressed as x 1 2 a 1 , 1 + 2 x 2 x 1 a 1 , 2 + 2 x 3 x 1 a 1 , 3 + 2 x 1 a 1 , 4 + x 2 2 a 2 , 2 + 2 x 2 x 3 a 2 , 3 + 2 x 2 a 2 , 4 + x 3 2 a 3 , 3 + 2 x 3 a 3 , 4 + a 4 , 4 = 0 , where the a variables are integers and the greatest common divisor of the a variables is 1 . The answer is the absolute value of the sum of the coefficients of the x variable terms."
A general quadratic polynomial can be written as: ( x 1 x 2 x 3 1 ) ⎝ ⎜ ⎜ ⎛ a 1 , 1 a 1 , 2 a 1 , 3 a 1 , 4 a 1 , 2 a 2 , 2 a 2 , 3 a 2 , 4 a 1 , 3 a 2 , 3 a 3 , 3 a 3 , 4 a 1 , 4 a 2 , 4 a 3 , 4 a 4 , 4 ⎠ ⎟ ⎟ ⎞ ⎝ ⎜ ⎜ ⎛ x 1 x 2 x 3 1 ⎠ ⎟ ⎟ ⎞ = x 1 2 a 1 , 1 + 2 x 2 x 1 a 1 , 2 + 2 x 3 x 1 a 1 , 3 + 2 x 1 a 1 , 4 + x 2 2 a 2 , 2 + 2 x 2 x 3 a 2 , 3 + 2 x 2 a 2 , 4 + x 3 2 a 3 , 3 + 2 x 3 a 3 , 4 + a 4 , 4 = 0 .
The coefficients of the polynomial form are a 1 , 1 , 2 a 1 , 2 , 2 a 1 , 3 , 2 a 1 , 4 , a 2 , 2 , 2 a 2 , 3 , 2 a 2 , 4 , a 3 , 3 , 2 a 3 , 4 , a 4 , 4 .
You will need to make them be integers by multiplying by an appropriate integer and by dividing by the greatest common divisor of the resultant integers (which is the equivalent of the p and q of q p must be relatively prime).
I supplied a worked solution of the same problem with a different ellipsoid and therefore a different answer.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Problem Loading...
Note Loading...
Set Loading...
As warned, matrix algebra and in particular, affine transformations are being used.
Generate the following matrix equation and simplify it: ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ⎝ ⎜ ⎜ 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∣ ∣ ∣ ∣ = 0 .
The outer vertical bars ∣ request the determinant of the matrix.
The result with everything on the left hand side is: 7 2 4 0 0 x 1 2 − 2 1 1 2 0 x 2 x 1 − 1 5 8 4 0 x 3 x 1 − 5 5 0 4 0 x 1 + 1 0 1 8 8 9 x 2 2 + 1 1 8 8 3 6 x 3 2 − 2 1 2 1 2 4 x 2 − 5 8 1 0 4 x 2 x 3 − 5 8 0 9 6 8 x 3 − 1 1 3 8 9 0 4 = 0
That is an equation of the ellipsoid. Apply the normalizations and and add the coefficients. ∴
Remember the a matrix. The matrix is symmetrical. The number of distinct values in the matrix is therefore 10. But, one of the values can be forced to being a specific value, e.g., a 4 , 4 can be made to be 1 . Therefore, in general, the number of needed points is 2 ( dimensions + 1 ) ( dimensions + 2 ) − 1 . That is also the rows that were added to make the matrix equation's matrix square so that the determinant could be computed.
Now how to extract the center of the ellipsoid and its semiradii.
Homogenous coordinates are used so that affine transformation methods can be used: { x 1 , x 2 , x 3 , 1 } .
A general quadratic polynomial can be written as: ( x 1 x 2 x 3 1 ) ⎝ ⎜ ⎜ ⎛ a 1 , 1 a 1 , 2 a 1 , 3 a 1 , 4 a 1 , 2 a 2 , 2 a 2 , 3 a 2 , 4 a 1 , 3 a 2 , 3 a 3 , 3 a 3 , 4 a 1 , 4 a 2 , 4 a 3 , 4 a 4 , 4 ⎠ ⎟ ⎟ ⎞ ⎝ ⎜ ⎜ ⎛ x 1 x 2 x 3 1 ⎠ ⎟ ⎟ ⎞ = x 1 2 a 1 , 1 + 2 x 2 x 1 a 1 , 2 + 2 x 3 x 1 a 1 , 3 + 2 x 1 a 1 , 4 + x 2 2 a 2 , 2 + 2 x 2 x 3 a 2 , 3 + 2 x 2 a 2 , 4 + x 3 2 a 3 , 3 + 2 x 3 a 3 , 4 + a 4 , 4 .
For the ellipsoid on which we are working, by equating matching terms, the values in the a matrix can be determined: a 1 , 1 → 7 2 4 0 0 , a 1 , 2 → − 1 0 5 6 0 , a 1 , 3 → − 7 9 2 0 , a 1 , 4 → − 2 7 5 2 0 , a 2 , 2 → 1 0 1 8 8 9 , a 2 , 3 → − 2 9 0 5 2 , a 2 , 4 → − 1 0 6 0 6 2 , a 3 , 3 → 1 1 8 8 3 6 , a 3 , 4 → − 2 9 0 4 8 4 , a 4 , 4 → − 1 1 3 8 9 0 4 . ⎝ ⎜ ⎜ ⎛ 7 2 4 0 0 − 1 0 5 6 0 − 7 9 2 0 − 2 7 5 2 0 − 1 0 5 6 0 1 0 1 8 8 9 − 2 9 0 5 2 − 1 0 6 0 6 2 − 7 9 2 0 − 2 9 0 5 2 1 1 8 8 3 6 − 2 9 0 4 8 4 − 2 7 5 2 0 − 1 0 6 0 6 2 − 2 9 0 4 8 4 − 1 1 3 8 9 0 4 ⎠ ⎟ ⎟ ⎞ .
The solution of this matrix equation gives the ellipsoid's center: ⎝ ⎛ 7 2 4 0 0 − 1 0 5 6 0 − 7 9 2 0 − 1 0 5 6 0 1 0 1 8 8 9 − 2 9 0 5 2 − 7 9 2 0 − 2 9 0 5 2 1 1 8 8 3 6 ⎠ ⎞ ⎝ ⎛ − c 1 − c 2 − c 3 ⎠ ⎞ = ⎝ ⎛ − 2 7 5 2 0 − 1 0 6 0 6 2 − 2 9 0 4 8 4 ⎠ ⎞ → ⎝ ⎛ 1 2 3 ⎠ ⎞
Translating the ellipsoid's center to the origin gives this equation: 7 2 4 0 0 x 1 2 − 2 1 1 2 0 x 2 x 1 − 1 5 8 4 0 x 3 x 1 + 1 0 1 8 8 9 x 2 2 + 1 1 8 8 3 6 x 3 2 − 5 8 1 0 4 x 2 x 3 − 2 2 5 0 0 0 0 = 0 .
Computing the eigenvalues and eigen vectors of the upper left square matrix of dimension dimensions , in this case, 3 by 3, gives: eigenvalues → { 1 4 0 6 2 5 , 9 0 0 0 0 , 6 2 5 0 0 } , eigenvectors → ⎝ ⎛ 0 − 1 5 2 0 − 3 1 6 1 2 4 1 2 9 ⎠ ⎞ .
The eigen vectors are read row-wise. When the vectors are normalized (adjusted so that their length is 1 ) gives a rotation matrix, which may be improper (that is, contains a reflection). Unfortunately, the order of the eigen values and of the columns of rotation matrix is correct. The information about mapping back to the x coordinates is lost though. Nonetheless, the values of the semi-radii can be extracted. The problem comes from the fact that there are dimensions ! → 3 ! → 6 from a sphere's axes to the final ellipsoid coordinates, each with an appropriate rotation matrix. One does not which mapping the eigensystem will present. The sphere is first scaled by the semi-radii, in some order, then rotated by a rotation matrix whose orderings are dependent both how the sphere is scaled and how the ellipsoid's coordinates are assigned. Please, see the animated GIF below.
Applying the inverse of the rotation matrix to q coordinates gives an equation: 1 4 0 6 2 5 q 1 2 + 9 0 0 0 0 q 2 2 + 6 2 5 0 0 q 3 2 − 2 2 5 0 0 0 0 = 0 . Dividing both sides by the constant term's abolute value 2 2 5 0 0 0 0 gives an equation: ( 4 q 1 ) 2 + ( 5 q 2 2 ) 2 + ( 6 q 3 2 ) 2 = 1 , from which the semi-radii can be read readily.
There are six frames, one for each possible transformation, the sets repeat five times. Each frame is oriented so that the final result is the same--showing one of each semi-radii in its final position and the one each of the original axes of the unit sphere (note, that the original sphere's axes do not start out in the same orientations in all cases) and the radii colors reflect the original sphere's radii: