Solving Overdetermined Equation Ax=0 and Singular Value Decomposition

Reference:

  1. Solve the overdetermined equation Ax=0

Article jump:

  1. Singular value decomposition SVD and principal component analysis PCA
  2. Lagrange multiplier method

The singular value decomposition has been introduced in the previous article, now let's talk about an application of the singular value decomposition.

Many problems in engineering will come down to solving the overdetermined equation A x = 0 \mathbf{Ax}=0Ax=0 A \mathbf{A} A m × n m\times n m×A matrix of n , andm > n m > nm>n . For example , triangulated map pointsin SLAM,PnPand other problems are all solving this equation.
Obviously, this equation has a zero solution, but that's not what we want, we actually want a non-zero solution.

In order to find a non-zero solution, we x \mathbf{x}x plus a constraint∥ x ∥ 2 = 1 \|\mathbf{x}\|^2=1x2=1 . That is to limitx \mathbf{x}x has length 1. and constructed as a constrained least squares problem:
x ^ = arg ⁡ min ⁡ ∥ A x ∥ 2 , subject to ∥ x ∥ 2 = 1 (1) \tag{1} \hat{\mathbf{x}} =\arg \min \|\mathbf{A} \mathbf{x}\|^2, \text { subject to }\|\mathbf{x}\|^2=1x^=argminAx2, subject to x2=1( 1 ) This is a least squares problem with constraints, we move outLagrangian:L
( x , λ ) = ∥ A x ∥ 2 + λ ( 1 − ∥ x ∥ 2 ) = x TATA x + λ ( 1 − x T x ) (2) \tag{2} \begin{aligned} L(\mathbf{x}, \lambda) & =\|\mathbf{A} \mathbf{x}\|^2 +\lambda\left(1-\|\mathbf{x}\|^2\right) \\ & =\mathbf{x}^T \mathbf{A}^T \mathbf{A} \mathbf{x} +\lambda\left(1-\mathbf{x}^T \mathbf{x}\right) \end{aligned}L(x,l )=Ax2+l(1x2)=xT ATAx+l(1xTx)( 2 ) In order to find the extremum, we respectively forx \mathbf{x}xλ \lambdaCalculate the partial derivative of λ , let it be 0 00 :
∂ L ( x , λ ) ∂ x = 2 ATA x − 2 λ x = 0 (3) \tag{3} \begin{array}{l}\frac{\partial L(\mathbf{x}, \lambda)}{\partial \mathbf{x}}=2 \mathbf{A}^T \mathbf{A} \mathbf{x}-2 \lambda \mathbf{x}=0\end{array}xL ( x , λ )=2A _TAx2 l x=0( 3 ) ∂ L ( x , λ ) ∂ λ = 1 − x T x = 0 (4) \tag{4} \begin{array}{l}\frac{\partial L(\mathbf{x}, \ lambda)}{\partial\lambda}=1-\mathbf{x}^T \mathbf{x}=0 \end{array}λL ( x , λ )=1xTx=0( 4 ) Let ( 3 ) be a function of:
( ATA − λ I ) x = 0 (5) \tag{5} \begin{array}{r} \left(\mathbf{A}^T \mathbf{A }-\lambda\mathbf{I}\right)\mathbf{x}=0\end{array}(AT AI ) _x=0( 5 ) ATA x = λ x (6) \tag{6}\begin{array}{r} \mathbf{A}^T \mathbf{A} \mathbf{x}=\lambda \mathbf{x}\ end { array }ATAx=λx( 6 ) It can be seen thatλ \lambdaλ x \mathbf{x} x are ATA \mathbf{A}^T \mathbf{A}respectivelyAThe特征值sumof T A. 特征向量That is to say, the solution of formula (1) is one of these eigenvectors.
The question is, so many eigenvectors, which one should be chosen as the solution? We expand∥ A x ∥ 2 \|\mathbf{A x}\|^2AxExercise 2
: ∥ A x ∥ 2 = x FATHER x = x T λ x = λ x T x = λ (7) \tag{7} \|\mathbf{A} \mathbf{x}\|^2= \mathbf{x}^T \mathbf{A}^T \mathbf{A} \mathbf{x}=\mathbf{x}^T \lambda \mathbf{x}=\lambda \mathbf{x}^T\ mathbf { x } = \ lambdaAx2=xT ATAx=xTλx=λxTx=l(7)

The derivation of formula (7) above uses formula (6) and ∥ x ∥ 2 = 1 \|\mathbf{x}\|^2=1x2=1

That is, we want ∥ A x ∥ 2 \|\mathbf{A} \mathbf{x}\|^2Ax2 is the smallest, we needλ \lambdaλ is the smallest.
Thenthe non-zero solution of equation (1) isATA \mathbf{A}^T\mathbf{A}AT Aminimum eigenvalueλ \lambdaThe eigenvector corresponding to λ is the right singular vector corresponding to the smallest singular value .

Guess you like

Origin blog.csdn.net/qq_28087491/article/details/130125451