NOTE / 5/5/2020
Solving an Overdetermined Homogeneous System Ax = 0
SLAMTechnical NotesSLAMVIOsensor fusion
Many engineering problems reduce to solving an overdetermined homogeneous system, where A is a matrix and the unknown is x. Examples include map-point triangulation in SLAM and some PnP formulations. The system clearly has the zero solution, but that is not the solution we seek; we want a nonzero x.
To obtain a nonzero solution, constrain x with ∥x∥2=1. In other words, constrain its length to one and form the following constrained least-squares problem:
x^=argmin∥Ax∥2, subject to ∥x∥2=1 (1)
This is a constrained least-squares problem, so introduce a Lagrange multiplier:
L(x,λ)=∥Ax∥2+λ(1−∥x∥2)=xTATAx+λ(1−xTx)(2)
To find an extremum, differentiate with respect to x and λ, then set both derivatives to zero:
∂x∂L(x,λ)∂λ∂L(x,λ)=2ATAx−2λx=0=1−xTx=0(3)(4)
Rearranging equation (3) gives:
(ATA−λI)x=0ATAx=λx(5)(6)
Therefore λ and x are, respectively, an eigenvalue and eigenvector of ATA. The solution to (1) must be one of these eigenvectors.
Which eigenvector should we choose? Expand ∥Ax∥2:
∥Ax∥2=xTATAx=xTλx=λxTx=λ(7)
The derivation of (7) uses equation (6) and the unit-norm constraint.
To minimize ∥Ax∥2, we need the smallest λ.
Thus, the nonzero solution of equation (1) is the eigenvector of ATA associated with its smallest eigenvalue λ.
References
- Karel Zimmermann. Lecture notes: overdetermined homogeneous linear system.
- Richard Hartley and Andrew Zisserman. Multiple View Geometry in Computer Vision.