[Math] Product between a column vector and a row vector

linear algebramatrices

I know that matrices product is correct when the number of the columns of the first matrix is equal to the number of rows of the second matrix.

Why I can't do the product between a column vector and a row vector? For example:

$$\begin{bmatrix}1 \\ 2 \\ 3 \end{bmatrix} \, \begin{bmatrix}1 & 2 & 3\end{bmatrix}$$

Thank you so much.

Best Answer

I know that matrices product is correct when the number of the columns of the first matrix is equal to the number of rows of the second matrix.

I wouldn't say "is correct", it is only defined in this case. You can invent your own product or way of multiplication, but the standard product of matrices only works, as you say, when the number of columns of the first matrix matches the number of rows of the second. Multiplying column or row vectors are simply special cases of matrices in general, so that condition still applies.

In short: it's a consequence of the (usual) definition of the product of matrices.

Why I can't do the product between a column vector and a row vector? For example:

$$\begin{bmatrix}1 \\ 2 \\ 3 \end{bmatrix} \, \begin{bmatrix}1 & 2 & 3\end{bmatrix}$$

Your example however, satisfies the condition you mention: the first matrix has $1$ column and the second one has $1$ row, so their product is defined. Note that as a result, you expect a $3\times 3$-matrix.

In general, multiplying an $m \times n$-matrix with an $n \times p$-matrix, gives you an $m \times p$-matrix: $$(\color{blue}{m} \times \color{red}{n}) \cdot (\color{red}{n} \times \color{purple}{p}) \to (\color{blue}{m} \times \color{purple}{p})$$