transpose
Say it “A transpose”
Flip a matrix over its diagonal: rows become columns. Turns a column vector into a row vector.
Example
In code
A.TA.T # or A.mT for batchesWhere you’ll see it in ML
Everywhere: 𝐰ᵀ𝐱, QKᵀ in attention, fixing shape mismatches.
Don’t confuse it with
Lessons that use it
- The dot product and the angle between vectors
- Multiplying matrices: check the shapes first
- Transpose, identity, inverse and determinant
- Special matrices: diagonal, symmetric, orthogonal, triangular, sparse
- The SVD: rotate, stretch, rotate
- Capstone: linear regression three ways
- Capstone: PCA on real handwritten digits
- Capstone: read three equations from real papers
- Read an equation: Linear model