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. 
 A: If $h$ is a scalar:
$$h\cdot \begin{bmatrix} 1 & 2 & 3 \end{bmatrix} = \begin{bmatrix} 1 & 2 & 3 \end{bmatrix} \cdot h = \begin{bmatrix} h & 2h & 3h \end{bmatrix} $$
If $h$ is a $1\times 1$ matrix,
$$\begin{bmatrix} h \end{bmatrix} \begin{bmatrix} 1 & 2 & 3 \end{bmatrix} = \begin{bmatrix} h & 2h & 3h \end{bmatrix}$$
and the multiplication yields the $1\times 3$ matrix we would expect. However, the following multiplication is not defined because the number of columns of the first matrix does not equal the number of rows of the second matrix:
$$\begin{bmatrix} 1 & 2 & 3 \end{bmatrix} \begin{bmatrix} h \end{bmatrix}$$
Thus the matrix multiplication is identical to scalar multiplication when defined. It's just that scalar multiplication is more universal and more defined.
A: 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.
A: There's not really a "subtlety" so to speak. Matrix products are not commutative. So $h\cdot A$ for a matrix $A$ is different than $A\cdot h$ for the same matrix $A$. In your example, $h$ is a scalar and may be thought of as a $1\times 1$ matrix but your matrix $A$ is $1\times 3$. So the product $h\cdot A$ is defined whereas $A\cdot h$ is undefined. 
The real problem for you it seems is in understanding when a matrix product is defined. Does my explanation above make sense?
