Even easier to remember, form the matrix [x1 x2 x3] [y1 y2 y3] = M M^T M is the (symmetric) _covariance_ matrix. The eigenvalues of this covariance matrix are (3/2)a^2 and (3/2)b^2, where a,b, are the semimajor and semiminor axes of the ellipse which is the projection of the circle onto the XY plane. R^2=max(a^2,b^2). This is the same computation as in the "real" version, below. You can even forget which order to perform the matrix multiplication: M M^T is another symmetric matrix. The eigenvalues of this matrix are a^2, b^2, 0, so once again R^2=max(a^2,b^2,0) is the largest eigenvalue. Alternatively, the Singular Value Decomposition (SVD) of the covariance matrix is the diagonal matrix sqrt(3/2)*diag(a,b), where R=a>0 is the largest singular value. At 08:58 AM 5/9/2014, Henry Baker wrote:
[High school kids could understand this, but probably not do it as an exercise.]
[Hints: least squares, Siebeck-Marden Theorem, max/abs hack.]
*** additional hint: variance/covariance ***
[Solution at bottom.]
We have an _equilateral_ triangle in arbitrary position in standard 3D space with coordinate axes x,y,z.
Translate this triangle (without rotations) so that its center becomes the origin.
The 3 vertices are P1=(x1,y1,z1), P2=(x2,y2,z2), P3=(x3,y3,z3).
We are given x1,y1,x2,y2 (but _not_ the z coordinates).
Obviously, x3=-x1-x2, y3=-y1-y2, due to the center being the origin.
Find a "simple" expression for the _radius_ of the circumcircle.
This problem is trivial in the case that x1^2+y1^2 = x2^2+y2^2 = x3^2+y3^2 = R^2, in which case z1=z2=z3=0, so we are interested in the more difficult case.
(Hint: you don't actually need the z coordinates.)
(Yes, I do have an answer, which is simpler than I had expected.) -------------------------------------------------- The hardest part of this problem is convincing yourself that it is even soluble. The 3 vertices are equally spaced around a ring which is rotated so that its projection onto the XY plane is an ellipse whose semimajor axis is the radius we seek. With only 3 points on the ring, it isn't a priori obvious that we have enough data to compute the parameters of the ellipse.
Nevertheless, the radius can be calculated with an elegant formula, thanks to a detour through the complex numbers.
Compute
real sumx2 = x1^2+x2^2+x3^2 real sumy2 = y1^2+y2^2+y3^2 complex sumz2 = (x1+iy1)^2+(x2+iy2)^2+(x3+iy3)^2
real 3*R^2 = sumx2 + sumy2 + |sumz2|
That's it!
[ If you want to work only with reals, real sumx2 = x1^2+x2^2+x3^2 real sumy2 = y1^2+y2^2+y3^2 real sumxy = x1*y1+x2*y2+x3*y3 real |sumz2| = sqrt((sumx2-sumy2)^2+4*sumxy^2) real 3*R^2 = sumx2+sumy2+|sumz2| ]
Here's the math: real a,b // The semi axes of the projected ellipse complex r1 = exp(i*phi)*(a*cos(theta)+b*i*sin(theta)) complex r2 = exp(i*phi)*(a*cos(theta+2*pi/3)+b*i*sin(theta+2*pi/3)) complex r3 = exp(i*phi)*(a*cos(theta-2*pi/3)+b*i*sin(theta-2*pi/3))
real sumx2=realpart(r1)^2+realpart(r2)^2+realpart(r3)^2 real sumy2=imagpart(r1)^2+imagpart(r2)^2+imagpart(r3)^2 real sumx2+sumy2 = (3/2) (a^2+b^2) complex sumz2 = r1^2+r2^2+r3^2 complex sumz2 = (3/2) exp(2*i*phi) (a^2-b^2) real |sumz2| = (3/2) |a^2-b^2| real sumx2+sumy2+|sumz2|=(3/2)(a^2+b^2+|a^2-b^2|)=3/2*2*max(a^2,b^2) = 3*max(a^2,b^2)
[This is my first _natural_ use of the max/abs hack in >50 years!]
The Marden Theorem tells us the major & minor axes of the ellipse formed by the 3 given points. If p(z) is the monic polynomial with r1,r2,r3 as roots, then p'(0) = (3/4)exp(2*i*phi)(a^2-b^2).
complex r1*r2+r1*r3+r2*r3 = (3/4) exp(2*i*phi) (a^2-b^2)
which is another way to compute |a^2-b^2|.
Does anyone know the earliest reference to the max/abs hack?
I tried Googling, but wasn't able to come up with anything.