The Better of Two Weight Matrices

Linear TransformationsMedium+20 XP+20

The Better of Two Weight Matrices

A classifier's first layer is a single weight matrix WWW applied to two-dimensional embeddings. Two points from different classes arrive:

c=(3,1)(class A),d=(1,2)(class B)c = (3, 1) \quad \text{(class A)}, \qquad d = (1, 2) \quad \text{(class B)}c=(3,1)(class A),d=(1,2)(class B)

A later layer can only separate the classes with a straight line, so what matters is how far apart this layer leaves the two points. Two candidate weight matrices are on the table:

CandidateWeight matrix
WAW_AWA​[2103]\begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix}[20​13​]
WBW_BWB​[1−241]\begin{bmatrix} 1 & -2 \\ 4 & 1 \end{bmatrix}[14​−21​]

For each candidate, transform both points and measure the straight-line distance between the two outputs. Then report the size of the gap between those two separations:

∣  ∥WBc−WBd∥  −  ∥WAc−WAd∥  ∣\Big\lvert\; \lVert W_B c - W_B d \rVert \;-\; \lVert W_A c - W_A d \rVert \;\Big\rvert​∥WB​c−WB​d∥−∥WA​c−WA​d∥​

Round your answer to two decimal places.

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

units