I just found this really weird thing in matlab,
when I do
x = [1 2 3];
tranpose(x)*x
I don't get $14$ as an output, but I get a 3 x 3 matrix
1 2 3
2 4 6
3 6 9
I just found this really weird thing in matlab,
when I do
x = [1 2 3];
tranpose(x)*x
I don't get $14$ as an output, but I get a 3 x 3 matrix
1 2 3
2 4 6
3 6 9
You want to use
x*Transpose(x)as x is an inverted vector.Transpose(x)is a matrix with three rows and one collumn.xis a matrix with one row and three collumns, thus 3by1 multiplied by 1by3 is according to the rules of matrix multiplication going to be a 3by3 matrix.This is slightly unintuitive, but if you know matrix (and vector) multiplication, try to multiply these on your own:
$$ \left(\begin{array} \text{1} \\ 2 \\ 3 \end{array}\right) \left(\begin{array} \ 1 \ 2 \ 3\end{array}\right) $$