II.11 · Linear Algebra
Transpose the frame; test whether geometry survives.
Exchange rows and columns, compute QᵀQ exactly, and compare rotations, reflections, shears, and scalings through the lengths and angles they preserve—or fail to preserve.
Transpose the frame; test what it preserves
The columns are an orthonormal frame. Q preserves dot products, so lengths and angles survive; a reflection may still reverse orientation.
- matrix A
- 2×2 [0, −1; 1, 0]
- transpose
- 2×2 [0, 1; −1, 0]
- orthogonality test
- 2×2 [1, 0; 0, 1]
- column dot product
- 0
- input length
- √52.236068…
- output length
- √52.236068…
- angle between x and y
- 1.570796
- angle between Qx and Qy
- 1.570796
- inverse-by-transpose test
- 2×2 [0, 1; −1, 0]
Exact expressions use =. Rounded computations use ≈. Every view uses this same state.
The columns are an orthonormal frame. Q preserves dot products, so lengths and angles survive; a reflection may still reverse orientation.
from −4 to 4, up to 2 decimal places
from −4 to 4, up to 2 decimal places
from −4 to 4, up to 2 decimal places
from −4 to 4, up to 2 decimal places
Start with Rotation and compare the two columns. Choose Reflection and notice that lengths and angles still survive even though orientation changes. Then choose Shear fails and move a column until the off-diagonal dot products vanish again.
Intuition: rows become columns
The transpose turns a matrix around its main diagonal. This simple exchange lets matrix multiplication collect column dot-products:
The diagonal entries are squared column lengths. The off-diagonal entries are pairwise dot products. One product therefore asks whether the columns form an orthonormal frame.
Definition
For an matrix , its transpose is the matrix defined by
A square matrix is orthogonal when
Equivalently, its columns are unit vectors and mutually orthogonal. In two dimensions, these columns form a rigid coordinate frame.
Mechanics: a certificate in one product
For ,
The identity result says both columns have length one and their dot product is zero. A shear fails through a nonzero off-diagonal entry. Unequal scaling fails through a diagonal entry other than one.
Derivation: dot products, lengths, and angles survive
If , then for any ,
Setting proves . Since dot products and lengths determine the cosine formula, angles between nonzero vectors are preserved too.
The transpose as an inverse—only here
The equation says that undoes . For a square orthogonal matrix,
This is a special structural shortcut, not a rule for arbitrary matrices. A shear’s transpose does not undo the shear, and a scaling transpose is usually the same scaling rather than its reciprocal. General inverses remain for II.16.
Rotations and reflections
A planar rotation by angle has columns and . A reflection also has orthonormal columns but reverses handedness. The interactive presets use exact quarter-turn and axis-reflection entries so the certificate is exact rather than tolerance-based.
Worked examples
For
direct multiplication gives . The vector becomes ; both have length .
Inspect the worked calculation
Transpose Q by exchanging rows and columns.
- matrix A
- 2×2 [0, −1; 1, 0]
- transpose
- 2×2 [0, 1; −1, 0]
- orthogonality test
- 2×2 [1, 0; 0, 1]
- column dot product
- 0
- input length
- √52.236068…
- output length
- √52.236068…
- angle between x and y
- 1.570796
- angle between Qx and Qy
- 1.570796
- inverse-by-transpose test
- 2×2 [0, 1; −1, 0]
For the shear , the columns have dot product , so . Some individual vectors may keep their length, but the map has no global preservation guarantee.
Executable reference code
The Python reference transposes and multiplies exact rational matrices, then asserts the identity certificate. The NumPy version compares dot products, lengths, and a reflection’s orientation while using an explicit tolerance for floating-point checks.
from fractions import Fraction as F
def transpose(a):
return tuple(zip(*a))
def matmul(left, right):
return tuple(tuple(sum((x * y for x, y in zip(row, column)), F(0)) for column in zip(*right)) for row in left)
Q = ((F(0), F(-1)), (F(1), F(0)))
I = ((F(1), F(0)), (F(0), F(1)))
assert matmul(transpose(Q), Q) == I
assert transpose(Q) == ((F(0), F(1)), (F(-1), F(0)))import numpy as np
Q = np.array([[0.0, -1.0], [1.0, 0.0]])
x, y = np.array([2.0, 1.0]), np.array([-1.0, 2.0])
np.testing.assert_allclose(Q.T @ Q, np.eye(2))
np.testing.assert_allclose(np.linalg.inv(Q), Q.T)
np.testing.assert_allclose(np.linalg.norm(Q @ x), np.linalg.norm(x))
np.testing.assert_allclose((Q @ x) @ (Q @ y), x @ y)Explore
Swap the two identity columns and identify the resulting reflection. Negate both columns and recognize a half-turn. Give one column length two and inspect the diagonal failure. Make unit-length columns that are not perpendicular, then perpendicular columns with unequal lengths. Explain each entry of .
Common mistakes
Transposition does not negate entries, and it does not reverse the order inside one vector. Perpendicular columns alone are not orthonormal unless each has unit length. Orthogonal matrices need not be symmetric, and reflections are not excluded. Most importantly, is false without the orthogonality certificate.
Numerical considerations
Exact entered decimals give an exact in this lesson. Floating-point code typically tests whether it is close to with a scale-aware tolerance. That numerical test is evidence about stored approximations, not a redefinition of orthogonality. Angle calculations should also guard zero vectors and clamp only tiny endpoint roundoff before applying arccos.
Engineering and ML connections
Orthogonal transforms preserve signal energy and avoid stretching some directions more than others. They appear in rigid motion, numerical factorization, initialization, and feature rotations. Their transpose is cheap to apply and stable as an inverse, but learned matrices are not automatically orthogonal unless a model or algorithm enforces that structure.
Exercises
Summary and checkpoints
The transpose exchanges rows and columns; contains all column dot-products. Check that you can recognize an orthonormal frame, prove preservation of dot products, lengths, and angles, include reflections, and restrict the transpose-inverse shortcut to square orthogonal matrices.