0
$\begingroup$

I am performing orthogonal distance regression on a set of points to find the best fit plane. I am using the method described on this page http://www.infogoaround.org/JBook/LSQ_Plane.html

The problem is that I end up with a linear homogenous system of the form:

Ax = 0

And I don't know a good computational way to solve this. (The author of the webpage says it is just an eigenvalue problem, but that looks nothing like an eigenvalue problem to me.)

A is a symmetric 3x3 matrix. I am writing some code to solve this (custom system so I can't use matrix libraries) and I'm not sure the best way to do it.

I would think there is a better/easier/more efficient method than Gauss-Jordan, but I don't know what that would be.

SVD seems to be promising, but the Wikipedia page makes it seem too intimidating to program!

Thanks

  • 0
    X is in the span of eigenvectors which are associated with 0 eigenvalues.2012-10-04

2 Answers 2

2

To regard the question about how is this an eigenvalue question:

Consider $B=\{e_{1},e_{2},e_{3}\}$ the standard basis of $\mathbb{R}^{3}$ and define $T:\mathbb{R}^{3}\to\mathbb{R}^{3}$ by $T(v):=Av$

You are looking for $ker(T)$ by definition.

Since $A$ is symmetric it is also diagonisable, if $v_{1},v_{2},v_{3}$ are independent eigenvector of $A$ then in the basis $B'=\{v_{1},v_{2},v_{3}\}$ you get the system $Dx=0$ where $D=diag(\lambda_{1},\lambda_{2},\lambda_{3})$ where $\lambda_{i}$ are the eigenvalues of $A$. Of course this system is very easy to solve.

You can always go back and write the solutions you found as a linear combination of the elements of $B$ (you can build a $3\times3$ matrix that takes vector written as linear combination of elements of $B'$ and gives you the vector written as linear combination of elements of $B$).

This also gives an algorithm (though I don't know about efficacy) , note that there is a closed formula to calculate the roots of a polynomial of degree $3$, but I think calculating the corresponding eigenvectors is as difficult as solveing the original question so I won't try this method.

  • 0
    I don't get how this helps. Isn't the only solution to Dx = 0 the trivial solution (0, 0, 0), which would be (0, 0, 0) in basis B as well? The goal is to find a nontrivial solution.2015-09-22
2

I am the author of the mentioned article at infogoaround.org. You can solve the eigen pair problem via the power method. If you still want the solution, let me know. I can send you a C program to solve the dominant eigen pair.