# Why is KroneckerProduct[vector, vector] a matrix in Mathematica, not a vector?

"If $A$ is an $m \times n$ matrix and $B$ is a $p \times q$ matrix, then the Kronecker product $A \otimes B$ is the $mp \times nq$ block matrix..."

Thus the Kronecker product of two vectors, i.e. $3\times 1$ matrices, should be a $9\times 1$ matrix, i.e. another vector. Nevertheless, Mathematica gives me a $3 \times 3$ matrix instead. Why is this the case and how can I change this?

• A 3-by-3 matrix is a 9-by-1 matrix, for most intents and purposes. Commented Oct 7, 2015 at 15:50
• Anyway, Mathematica has to make some assumptions, and (look at the documentation for Dot), it sometimes treats a 3-by-1 vector as a 1-by-3 matrix instead. Try KroneckerProduct[{d, e, f}, {{a}, {b}, {c}}]. Commented Oct 7, 2015 at 15:56

## 1 Answer

I'm not quite sure how you obtained a $9\times 9$ matrix. Here is a workaround, in any event:

KroneckerProduct[List /@ {a, b, c}, List /@ {p, q, r}] // Flatten
{a p, a q, a r, b p, b q, b r, c p, c q, c r}