An image-augmentation step applies a 2 × 2 linear map M to pixel coordinates. The plot shows the unit square (dashed) and its image under M (solid), with the images of (1, 0) and (0, 1) labelled. What is det(M), and what does it say about the transformation?
Show the answer and explanation
Correct answer: C, det(M) = −3: areas are scaled by 3 and orientation flips (the images of the two axes swap their order), and the map is invertible because det ≠ 0
Explanation Linear Algebra
The columns of a matrix are the images of the basis vectors. Reading the plot, M·(1, 0) = (1, 2) and M·(0, 1) = (2, 1), so M = [[1, 2], [2, 1]] and det(M) = 1·1 − 2·2 = −3.
What the determinant says about a linear map:
- |det| is the area scale factor: the unit square (area 1) becomes a parallelogram of area 3.
- The sign is orientation. Walking the square anticlockwise, (0, 0) → (1, 0) → (1, 1) → (0, 1), the image is walked clockwise, (0, 0) → (1, 2) → (3, 3) → (2, 1). A negative determinant means a reflection is involved, so the augmented image is mirrored.
- det = 0 means the columns are dependent and the plane collapses onto a line or a point, so the map cannot be undone.
Here det ≠ 0, so M is invertible; its eigenvalues are 3 and −1, whose product is −3.
Why the others are wrong: the parallelogram's area is |det|, but the determinant itself is signed, so 3 drops the orientation flip. The vectors (1, 2) and (2, 1) mirror each other but are not multiples of each other, so they are independent; a dependent pair would be (1, 2) and (2, 4). Invertibility depends only on det ≠ 0, not on the sign: a horizontal flip diag(−1, 1) has det −1 and is its own inverse.
Interview tip: link this to ML: the change-of-variables formula in normalizing flows rescales densities by 1/|det J| of the Jacobian, exactly this area-scaling idea.