MATLAB: What is A/B when A and B are 1×3 row vectors

division

This is so simple...i think i'm missing some thing
What is the result of A/B ???? (if A and B are same length row vectors)
ex: A=[1 2 3]; B=[4 5 6];
A/B in MAtlab gives me 0.4156

Best Answer

I want to know how this gives me 0.4156 ??? A/B is A*inv(B) ....
A/B is always defined as the least squares solution to the equation,
A=X*B
or
min. f(X) = norm(A-X*B)
In this case, the solution X has to be a scalar, since that is the matrix shape that can be left multiplied with B to produce another 1x3 matrix A. You can readily confirm that X=0.4156 is the minimizing value by plotting f(X),
>> fplot(@(X)norm(A-X*B),[0.41,.42])