This problem appears in an optimization process or controller design including a coordinate transformation of a state.
A problem is to get
x that satisfy
Ax=y,
where
A∈Rm×n, x∈Rn, y∈Rm.
How to solve this depends on the size of
A.
When
A is a positive-definite,
m=n.
In the case, there exist the inverse matrix of
A.
A solution is uniquely sought as
x^=A−1y.
When
m>n. There is no solution.
As an alternative, a vector that satisfy the following equation is provided.
x^=xargmin 21∥Ax−y∥22.
A solution is sought as
∂x∂(21∥Ax−y∥22)⇔ATAx−ATy=AT(Ax−y)=0=0
∴x^=(ATA)−1ATy.
When
m<n. There are many solutions.
A generalized solution is provided using the sum of a vectors
x^xmxnull=xm+xnull≡xargmin 21∥x∥22 s. t. Ax=y≡{x ∣ Ax=0}∈Ker(A)
These vectors are sought as
⇔⇔L(x,λ)=21xTx+λ(Ax−y){∂x∂L(xm,λ)=xm−ATλ=0∂λ∂L(xm,λ)=Axm−y=0{xm=ATλAATλ=y⎩⎨⎧xm=AT(AAT)−1yλ=(AAT)−1y
xnull=(I−AT(AAT)−1A)k.
Then, the generalized form is obtained as
x^=AT(AAT)−1y+(I−AT(AAT)−1A)k.
Pseudo Inverse and solution
A pseudo inverse matrix is given as
A+=⎩⎨⎧A−1(ATA)−1ATAT(AAT)−1(m=n)(m>n)(m<n).
This matrix provide a solution as
x^=⎩⎨⎧A+yA+yA+y+(I−A+A)k(m=n)(m>n)(m<n)