how to get inverse ?

조회 수: 4 (최근 30일)
종영
종영 2024년 8월 17일
댓글: John D'Errico 2024년 8월 17일
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
Rik
Rik 2024년 8월 17일
What exactly is your question? Do you want to find out whether a is equal to aa?

댓글을 달려면 로그인하십시오.

채택된 답변

akshatsood
akshatsood 2024년 8월 17일
편집: akshatsood 2024년 8월 17일
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
Steven Lord
Steven Lord 2024년 8월 17일
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 2024년 8월 17일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Analysis of Variance and Covariance에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by