Matrix column updation via optimization
Show older comments
I have an initial matrix B of size (n x n). I have to update each columns of the matrix except the first column such that the updated matrix is orthogonal (BB^T =I) and it also satisfies the constraint (say Bx=c). Is there any existing optimization algorithm to solve it?
13 Comments
KALYAN ACHARJYA
on 27 Oct 2022
Any sample example?
John D'Errico
on 27 Oct 2022
Edited: John D'Errico
on 27 Oct 2022
I'm sorry, but this makes no sense.
You are asking to modify the matrix B, reducing it to an orthogonal matrix. But then your "constraint" introduces a completely new variable, x. What is x, and what are you then hoping to optimize? Such an orthogonality reduction for B is a simple one (gram-schmidt is an example), that needs nothing more than linear algebra.
My guess is you wanted to speicify some sort of constraint on the reduction to an orthogonal matrix, and you just wrote down the first thing that came to mind, even if it made no sense in context. Are x and c known vectors?
I can see other problems too. If you will modify the columns of b, not touching the FIRST column, then it is required that the first column of B must already be unit normalized. And that would say you may need to modify even the first column of B. Otherise it is impossible for B'*B to yield the identity.
Veena Narayanan
on 27 Oct 2022
Edited: Veena Narayanan
on 27 Oct 2022
You wrote down the optimization problem you have to solve:
min: (norm(B*x - c))^2
under the constraints
B*B^T = I
B(:,1) = given from original matrix B (should be a vector of norm 1)
I don't know if there is a theoretical solution.
Try "fmincon" to solve.
Do x and c have the same vector norm ?
Veena Narayanan
on 27 Oct 2022
Veena Narayanan
on 1 Nov 2022
Torsten
on 1 Nov 2022
If this is the problem you are trying to solve, it has a simple solution:
If you define
u = (x-c)/norm(x-c)
and
B = eye(64) - 2*u*u'
then B*x = c and B is an orthogonal matrix.
The difficulty arises because you want to keep the first column of the matrix B unchanged.
Veena Narayanan
on 2 Nov 2022
But the orthogonality constraint should be satifiied retaining the first column same as that of the matrix B.
I don't understand. If you construct a matrix B' as above, it is orthogonal and satisfies B'*x = c.
But it is not related to your initial matrix B. Especially if you replace the first column of B' with the first column of B, B'*x = w and B' orthogonal will no longer be true in general.
I posted this "solution" because you don't use in your code that you want to prescribe the first column of B'. So the
B' = eye(64) - 2*u*u'
from above could be one solution from your code if run successfully.
Veena Narayanan
on 2 Nov 2022
Veena Narayanan
on 2 Nov 2022
Edited: Veena Narayanan
on 2 Nov 2022
Accepted Answer
More Answers (0)
Categories
Find more on Linear Least Squares in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!