1
$\begingroup$

Given are real matrices $A=\begin{pmatrix} 2 & 5 & -3\\ 0 & -1 & 6 \end{pmatrix}$ and $B=\begin{pmatrix} 1 & 3 & 2 \end{pmatrix}$

Is multiplication $A \cdot B$ possible?


I say no but I'm not sure if the reasoning will be correct.

It should not work because $A$ has $3$ rows but $B$ has only $1$ column. And because they aren't equal, it doesn't work to do multiplication?

Or Is that completely wrong?

  • 1
    No, https://en.wikipedia.org/wiki/Matrix_multiplication2017-01-09
  • 0
    Like they are now, you indeed can't multiply them. If you were to take the transpose of $B$ however...2017-01-09
  • 0
    Nice fact to remember: $A \cdot B \in \mathbb{R}^{n \times m}$ if $A \in \mathbb{R}^{n \times \color{red}{k}}, B \in \mathbb{R}^{\color{red}{k} \times m}$.2017-01-09
  • 0
    $AB^T$ will work. The number of columns of the matrix on the left must equal the number of rows of the matrix on the right. The mnemonic I learned in school is "run across and dive in."2017-01-09
  • 0
    "because $A$ has $3$ rows but $B$ has only $1$ column". You might want to do the counting again? `:-)`2017-01-09

4 Answers 4

2

Your suspicions are right. You just confused rows with columns in your post. The rows are the lines that span horizontally and the columns are the lines that span vertically.

The product $A\cdot B$ is only defined when the number of columns of $A$ is the same as the number of rows in $B$.

$A$ has 3 columns but $B$ only has 1 row, therefore you can't multiply them.

When the dimensions are as I told you, the entry $i,j$ is equal to the dot product of the $i$-th row of $A$ and the $j$-th column of $B$. That is exactly why you must have that: the dot product of two vectors only works for vectors of the same dimension. Well, a row of $A$ has as many entries as there are columns in $A$. A column of $B$ has as many entries as there are rows in $B$.

  • 2
    +1 for the nice answer that pleased the OP. I think you should have noted that he or she had the right intuition, and that you were confirming it.2017-01-09
  • 0
    @EthanBolker thanks for noting it, I shall edit accordingly given that I agree with you.2017-01-09
1

If you are talking about matrix multiplications when you write $A\cdot B$, then NO, it is impossible by definition.

To do multiplication $PQ$ for two matrices $P$ and $Q$, the sizes must match: the number of the rows of $Q$ must be equal to the number of the columns of $P$.

On the other hand, in this particular case one could define the operator $A\cdot B$ in different ways, though none of them seems to be very interesting. For instance

  • $A\cdot B:=AB^T$
  • or $A\cdot B:=C$ where $C=(a_1,a_2)$ where $a_i$ is the inner product of $B$ and the $i$-th row of $A$.
  • or $A\cdot B:=0$.
  • 0
    That's my own problem. I do it to learn and you even answered my question. Anyway thanks for the down vote.2017-01-09
  • 0
    I am not criticizing you but the question itself. And I do think the question could be asked in a better way if motivation and context are provided. I don't understand what is this "Anyway thanks for the down vote" for.2017-01-09
1

The rule is quite simple to multiply two matrices $A$ and $B$: If A has n columns, then B must have n rows.

1

You're correct about it being impossible, and you can think of it like this:

A: Row x Column
B: Row x Column

We always write the rows before the columns, and the bold numbers above have to be equal for multiplication to be possible.

A: 2 x 3
B: 1 x 3

The resultant matrix will have dimensions found by taking the other two numbers (not in bold). So, if AB were possible here, the resultant matrix would have dimensions of 2 x 3.