Finding plane equation from an orthonormal basis

258 Views Asked by At

I have a $3$-dimensional data set, $\textbf{X}$, from which I have found the singular value decomposition $\textbf{X}$=$\textbf{U}$$\textbf{S}$$\textbf{W}^T$.

As I understand, the vectors $\left\{c_1,\:c_2,\:c_3\right\}$ of $\textbf{W}$ form an orthonormal basis of the dataset $\textbf{X}$. The first two vectors $\left\{c_1\:c_2\right\}$ form the basis of a plane in $3$D and I want to find the equation of this plane in the form of $Ax+By+Cz+D=0$.

I thought the normal vector $\textbf{n}=c_3=c_1\times c_2 =\left[A\:B\:C\right]^T$ would define the planes parameters. I could then solve for $z$ and plot the plane using whatever software I want. However, the book I'm following finds the matrix product of $\left\{c_1\:c_2\right\}^T\left\{c_1\:c_2\right\}=\{r_1\:r_2\:r_3\}$ and sets $\left[A\:B\:C\right]=\{r_3\}$.

The code I'm referencing can be found here @ module $23$. Can someone explain to me why his method is correct, and what I am missing? I don't understand how the plane equation is solved this way. Is my original thought of using the normal vector to describe the plane correct?

The code in question is below :
C = pca.components_ #Eigenvectors 1 & 2
R = C.T.dot(C) #This performs matrix multiplication when arrays are larger than 1D (R is 3x3)
z = (R[0, 2] * x1 + R[1, 2] * x2) / (1 - R[2, 2])

Edit : It turns out using the orthogonal vector and the method describe are equivalent, but I don't understand why.

1

There are 1 best solutions below

0
On BEST ANSWER

The book author contacted me back and described it like this :

"If we project the dataset from 3D down to 2D and then back to 3D, we get the 3D coordinates of the projections of all the original points onto the 2D plane in 3D space. If we define R = C.T @ C then multiplying the original 3D dataset by R will just chain both operations and give use the coordinates of the projection onto the plane in 3D space."

So it is the projections of the original coordinates onto the planes basis if I understand it correctly. This makes it equivalent to solving the plane equation and solving for the third dimensions coordinates directly. Link to the answer if anyone is interested