0
$\begingroup$

I am trying to calculate the product of a vector and an inversed matrix in wolfram alpha: $\begin{bmatrix}1 & 2 & 3\end{bmatrix}$ * $\begin{bmatrix} -0.5 & 0 & 0 \\ 3 & 1 & 0 \\ 1 & 0 & 1\end{bmatrix}^{-1}$

However, when I enter the following into wolfram-alpha:

{1,2,3}*Inverse[{{-0.5, 0, 0}, {3, 1, 0}, {1, 0, 1}}]

the result is a 3*3 matrix.

Only calculating the inverse first and then entering

{1,2,3}*{{-2,0,0},{6,1,0},{2,0,1}}

produces the correct result $\begin{bmatrix}16 & 2 & 3\end{bmatrix}$

What am I doing wrong?

$\endgroup$
2
  • 1
    $\begingroup$ For mathematica or wolfram alpha, use a "." rather than a "*". Also, you should put your vector as a column vector on the right. ie) A . {1,2,3} $\endgroup$ – muzzlator Mar 19 '13 at 3:53
  • $\begingroup$ Although it does not matter in this problem, whenever you can keep your matrix in symbolic form, you should do so, in case there are numerical issues, so you would have: {1,2,3}.Inverse[{{-1/2,0,0},{3,1,0},{1,0,1}}] $\endgroup$ – Amzoti Mar 19 '13 at 4:22
1
$\begingroup$

For mathematica or wolfram alpha, use a "." rather than a "" as this corresponds to a matrix product ( can be ambiguous and often means a pointwise product). Also, you should put your vector as a column vector on the right. ie) A . {1,2,3}

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.