Contenido del curso

Transposing Matrices to Fix Multiplication

Resumen

When you multiply matrices, dimensions rule everything. If the inner numbers don't match, the operation is impossible. That's where matrix transposition comes in: a simple yet powerful operation that flips rows into columns so you can finally multiply matrices that seemed incompatible.

What is matrix transposition and why does it matter?

Transposition swaps the rows and columns of a matrix. The first row becomes the first column, the second row becomes the second column, and so on. If you have a matrix A with dimensions m × n, its transpose, written as Aᵀ, will have dimensions n × m.

Think of it as changing the perspective of a transformation. If A has columns î and ĵ (the basis vectors after a transformation), then Aᵀ rebuilds those basis vectors from the rows instead.

What does transposing a matrix mean? It means turning rows into columns. A 2×3 matrix becomes a 3×2 matrix, and the basis vectors î and ĵ are redefined from the rows of the original.

How does transposition look geometrically?

Take the matrix A = [3, 0; 1, 2]. Its transpose is Aᵀ = [3, 1; 0, 2]. Plotted on the plane, the original transformation has columns (3, 0) and (1, 2). After transposing, î becomes (3, 1) and ĵ becomes (0, 2).

The parallelogram that represents the transformation shifts slightly to the left. That visual shift is exactly what transposition does: it reorients the same data from a different angle.

How do you fix incompatible matrices for multiplication?

Let's start with two compatible matrices. A = [1, 0; 2, 1] and B = [2, 1; 0, 1] are both 2×2. You can multiply them directly because the inner dimensions match.

Now imagine matrix C, a 2×3 with values [7, 10; 8, 11; 9, 12]. You can multiply A (2×2) by C (2×3) because the columns of A match the rows of C. The result is a 2×3 matrix.

But what if you want to multiply C by A? C is 2×3 and A is 2×2. The inner numbers (3 and 2) don't match. The operation fails.

When should you apply a transpose?

Apply a transpose when the inner dimensions don't match and you need to align them. Transposing C gives you Cᵀ = [7, 8, 9; 10, 11, 12], a 3×2 matrix. Now Cᵀ × A works because 3×2 multiplied by 2×2 gives a 3×2 result.

When do I need to transpose a matrix? Whenever the columns of the first matrix don't match the rows of the second. Transposing flips the dimensions so the multiplication becomes possible.

What are the key properties of matrix transposition?

Three properties that make working with transposes much easier:

  • The transpose of a transpose returns the original matrix: (Aᵀ)ᵀ = A. If you swap rows and columns twice, you end up where you started.
  • The transpose of a sum equals the sum of the transposes: (A + B)ᵀ = Aᵀ + Bᵀ.
  • The transpose of a product reverses the order: (AB)ᵀ = Bᵀ × Aᵀ.

That last property is especially interesting. If A represents a rotation and B represents a shear, multiplying them composes both transformations. When you transpose the product, you must transpose each matrix individually and reverse their order.

Why does the order reverse in (AB)ᵀ?

Because transposition changes the perspective of each transformation, and composing them in reverse order keeps the geometry consistent. It's the same logic from composing transformations: order matters, and transposing forces you to flip it.

How do you practice transposition with a real exercise?

Here's the challenge from the lesson. You have matrix A with dimensions 2×3:

A = [1, 2, 3; 5, 7, 8]

And matrix B with dimensions 4×3:

B = [1, 2, 5, 6; 3, 4, 5, 6; 0, 1, 3, 4]

Try to calculate A × B. Ask yourself: do the inner dimensions match? If not, which matrix do you need to transpose, and what dimensions will you end up with?

Run the calculation and share your result in the comments. Did you need to apply a transpose? Which one and why?