Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

How to multiply a matrix by a column vector in Wolfram Alpha? [closed]

Writer Olivia Zamora
$\begingroup$

I know how to enter matrices in Wolfram Alpha

{{a,0,0,0},{0,b,0,0},{0,0,c,d},{0,0,e,0}}

enter image description here

I can't seem to multiply this by a column vector

{{a,0,0,0},{0,b,0,0},{0,0,c,d},{0,0,e,0}}{{x/a},{y/b},{p},{q}}

enter image description here

The documentation examples seem to be for matrices with both dimensions >1. How do I input the right-hand part as a column vector?

$\endgroup$ 1

1 Answer

$\begingroup$

The matrix example page at WolframAlpha has a matrix-vector product example. Basically, you remove the inner sets of curly brackets, and you give it an explicit multiplication symbol, and you get a result:

{{a,0,0,0},{0,b,0,0},{0,0,c,d},{0,0,e,0}}*{x/a,y/b,p,q}

Alternately, you can add a second dummy column to your vector to force WA to think about the matrix the way you want it to, and then ignore the second column of the output.

$\endgroup$ 2