I could not understand the process of dividing two not square matrices....

Hello everyone, hope you are doing well :)
I want to ask a question maybe it's silly but i really need your help :$
when i divide two matrix in matlab like this :
x=[1 2 3;
4 5 6];
y=[1 2 3;
4 5 7];
the result will be
[1 0;-0.7143 1.2]
why ??? what is the process here ?? I tried to divide it by vector but it give me another answer I tried to calculate it in another way by multiply x*inv(y) but i could not because it's not legal to calculate inv for not square matrix.
can anyone help me.

 Accepted Answer

Read the help for mldivide. That will explain to you in detail what
x/y
means. Not that the above operation is actually called mrdivide(), but it is the same as
(y'\x')'
which is the transpose of
mldivide(y',x')
The help for mldivide() explains how the solution is arrived at.

More Answers (1)

MATLAB is doing the matrix division, as you suspected, but in this case it is equivalent to using the "pseudoinverse":
>> z = x * pinv(y);
(That's not actually the calculation it does numerically, though.)
See
>> doc slash
and
>> doc pinv
for some details.
Perhaps you wanted element-by-element division? Then,
>> z = x./y

1 Comment

I found this link explain the pinv http://www.mathworks.com/help/symbolic/pinv.html
but it really complicated to implement to c# maybe i have to find another way.

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!