how to get inverse ?

4 visualizzazioni (ultimi 30 giorni)
종영
종영 il 17 Ago 2024
Commentato: John D'Errico il 17 Ago 2024
a = [1 2 3];
b = [3 2 1 ].';
c = a*b;
aa = c*pinv(b) ;
i want to answer a = aa but i can't
pleas~~~~
  1 Commento
Rik
Rik il 17 Ago 2024
What exactly is your question? Do you want to find out whether a is equal to aa?

Accedi per commentare.

Risposta accettata

akshatsood
akshatsood il 17 Ago 2024
Modificato: akshatsood il 17 Ago 2024
Dear @종영
I understand that you are trying to recover the original vector "a" from matrix multiplication. The issue here is that "c" is a scalar, so when you multiply "c" by pseudo-inverse of "b", you do not necessarily get back the original vector "a".
Explanation: The operation "c * pinv(b)" gives you a vector that tries to approximate "a" under the least-squares solution, but it woould not necessarily equal "a" unless certain conditions are met (e.g., "b" is orthogonal).
Solution: To directly recover "a", you need more information than just "c" and "b". However, if you have control over the process, you can ensure that "b" is orthogonal or use other constraints to make this recovery possible. However, without additional information or constraints, "a" cannot be reconstructed from "c * pinv(b)" operation.
I hope this helps.
  6 Commenti
Steven Lord
Steven Lord il 17 Ago 2024
With c == 10, are there other vectors x, such that x*b == 10. In fact, there are infinitely many such vectors. The simplest one is one you will get from pinv, or from lsqminnorm.
The simplest in some sense. But as you said, there are others.
a = [1 2 3];
b = [3 2 1 ].';
c = a*b
c = 10
alsoc = [0 0 10]*b
alsoc = 10
alsoc2 = [0 5 0]*b
alsoc2 = 10
alsoc3 = [3 0 1]*b
alsoc3 = 10
If you didn't know a, how could you rule out that a is [0 0 10], [0 5 0], or [3 0 1] instead of [1 2 3]? Either of the vectors used to create alsoc or alsoc2 could be considered "simpler" as they only have one non-zero element, as does the solution returned by \.
a2 = 10/b
a2 = 1x3
3.3333 0 0
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
a2*b
ans = 10
John D'Errico
John D'Errico il 17 Ago 2024
Yes, I guess my use of simplest as a description is arguable. Certainly
a = [10/3, 0, 0]
a = [0 0 10]
a = [0 5 0]
or
a = [10/6, 10/6, 10/6]
Would as easily qualify, and are surely simpler by most definitions of the word. They all work as well as any other.

Accedi per commentare.

Più risposte (0)

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by