4x 2 12x 8 describes matrix dimensions where a 4×2 matrix multiplies a 12×8 matrix. The first number in each pair is rows, the second is columns.
Matrix multiplication requires the inner dimensions to match. For two matrices A and B, if A has size m×n and B has size n×p, their product AB has size m×p. The key is that the number of columns in A must equal the number of rows in B.
There are three common scenarios:
This pattern appears in systems of linear equations, computer graphics transformations, and statistical modeling. For example, in computer graphics, a 4×4 transformation matrix might multiply a 4×1 vector representing a point in 3D space plus homogeneous coordinate.
Many people assume matrix multiplication is commutative (AB = BA), but this is rarely true. For example, a 4×2 matrix multiplied by a 2×3 matrix gives a 4×3 result, but reversing the order would require different dimensions. Another mistake is assuming all matrices of the same "type" (like all 4×2) can multiply each other - they can't unless the inner dimensions match.
One non-obvious fact: While 4×2 and 2×3 matrices can multiply (resulting in 4×3), their transposes (2×4 and 3×2) cannot multiply in either order. This asymmetry often surprises beginners.
Consider multiplying a 4×2 matrix A and a 2×3 matrix B:
A = [1 2
3 4
5 6
7 8]
B = [9 10 11
12 13 14]
The resulting 4×3 matrix C has elements calculated as:
C[1,1] = (1×9)+(2×12) = 33 C[1,2] = (1×10)+(2×13) = 36 ... C[4,3] = (7×11)+(8×14) = 157
This demonstrates the 4×2 2×3 pattern in action. The inner dimensions (2) match, allowing multiplication to produce a 4×3 result.