Interpreting $\begin{bmatrix} 1 & 2 & 3 \end{bmatrix} \cdot h $ as a scalar or matrix multiplication As part of another problem I am working on, I have the following product to work out. 
$\begin{bmatrix} 1 & 2 & 3 \end{bmatrix} \cdot h $
where $h$ is a scalar. My question is, if I commute the row vector and the scalar then I can just multiply it through. If I think of the $h$ as a $1 \times 1$ matrix however, it seems that this isn't allowed. 
I know it sounds simple, but I want to understand the subtlety involved. 

As a reminder, if we have $A$ and $B$ be $n\times m$ and $m \times p$ matrices (respectively) then $AB$ is a $n \times p$ matrix. Matrix multiplication will work if the number of columns of the first matrix matches the number of rows of the second matrix. This is also the reason why matrix multiplication is not commutative. If we let $[h]$ be a $1\times 1$ matrix and we have the $1 \times 3$ matrix $\begin{bmatrix} 1 & 2 & 3 \end{bmatrix},$ then we can certainly multiply the two. The product will be a $1 \times 3$ matrix equal to $\begin{bmatrix} h & 2h & 3h \end{bmatrix}$.  
So that all works out fine if we treat $h$ as a $1\times 1$ matrix and we multiply from the left. It is clear we cannot multiply a $1\times 1$ matrix on the right of $\begin{bmatrix} 1 & 2 & 3 \end{bmatrix}$ and we couldn't multiply at all if you had a matrix with more than one row. We can get around this if we scrap the idea that $h$ has to be a $1 \times 1$ matrix. Consider the $n \times n$ identity matrix $I_n$, except with a diagonal of $h$'s instead of $1$'s. Simply make $n$ is the number that allows you to multiply with the matrix you are after. For example, if we want to multiply on the right of  $\begin{bmatrix} 1 & 2 & 3 \end{bmatrix}$ we need $n = 3$, and you should find that $$\begin{bmatrix} 1 & 2 & 3 \end{bmatrix}\begin{bmatrix} h & 0 & 0 \\ 0 & h & 0  \\ 0 & 0 & h \end{bmatrix} = \begin{bmatrix} h & 2h & 3h \end{bmatrix}$$
The reasoning has gotten a bit circular now as $\begin{bmatrix} h & 0 & 0 \\ 0 & h & 0  \\ 0 & 0 & h \end{bmatrix}  = hI_3$. So in conclusion, scalars are not matrices, and matrices are not scalars. Even if sometimes they can be coaxed in a way to make it look like they act the same. There are very nice, scalar-exclusive properties that you can take advantage of as you work through linear algebra, just as there are very nice matrix-exclusive properties.
