Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Suppose you have a matrix $A =\begin{bmatrix} 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{bmatrix}$ and $B = [1,2]$. I want to multiply the matrices together so I get a $3 \times 1$ resulting matrix where each entry is equal to $1*a1 + 2*a2$. How would I do this? The number of columns in matrix in matrix A is not the same as the number of rows in matrix B so I am not sure what to do.

share|improve this question
1  
You sure ly want $B$ to be a column, not a row, vector. –  1015 Apr 19 '13 at 21:22

1 Answer 1

up vote 2 down vote accepted

If $A$ is a $m\times n$ and $B$ is a $j\times k$ matrix, then multiplication $AB$ is only defined when $n=j$, and the result will be an $m\times k$ matrix.

You could modify the example you have by transposing one of the matrices. For example, $AB^T$ is defined, and $BA^T$ is defined. The former would be a $3\times 1$ and the latter would be a $1\times 3$.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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