Search code examples
matlaboperation

What does the operation A'\B' do if A and B are both row vectors of the same size?


[1 2 1]'\[1 2 3]' This is a numerical example. This example gives an answer of 1.333


Solution

  • From the documentation:

    x = A\B
    

    If A is a rectangular m-by-n matrix with m ~= n, and B is a matrix with m rows, then A\B returns a least-squares solution to the system of equations A*x= B.

    Furthermore the ' compute the conjugate transposed of a matrix. In your case you have two real matrices so you just get the transposed each time.