Equation of plane from the EigenVectors of covariance matrix

1k Views Asked by At

I am working on some data which are 3D in dimensions. Using the PCA, I found the eigenvectors and eigenvalues which gives the direction of data spread. Sorry my maths is quite poor.

I want to plot the 3 planes (for visualization) that gives the 3 direction of the data spread for my report. I am using C++ thats why I cant use any plotting tools like matlab so I am writing my own.

How can I get the equation of the planes from the eigenvectors? The eigenvectors are direction so is it the normals of the plane? Equation of form Ax+by+cz+d = 0, what is will be the d value.

1

There are 1 best solutions below

2
On BEST ANSWER

If what you are talking about are principal planes and you would like to find that out. Let $\pmb{R} \in \mathbb{R}^{3 \times 3}$ be your covariance matrix and call $\pmb{v}_1$, $\pmb{v}_2$, and $\pmb{v}_3$ the eigenvectors, then the plane normal to $\pmb{v}_k$ is \begin{equation} \pmb{v}_k^{\text{T}} \begin{bmatrix} x - x_0\\ y - y_0\\ z - z_0 \end{bmatrix} = 0 \end{equation} where $(x_0,y_0,z_0)$ is a point on the plane. These values determine the $d$ you are talking about.