Two Layers, One Matrix

Linear Algebra for Deep LearningEasy+10 XP+10

Two Layers, One Matrix

A network has two purely linear layers — no bias, no activation function. Layer AAA runs first, then layer BBB:

A=[2103]B=[1−120]A = \begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix} \qquad B = \begin{bmatrix} 1 & -1 \\ 2 & 0 \end{bmatrix}A=[20​13​]B=[12​−10​]

So the network computes x↦B(Ax)x \mapsto B(Ax)x↦B(Ax).

Because nothing nonlinear sits between them, these two layers collapse into a single equivalent layer. Which single matrix CCC satisfies Cx=B(Ax)Cx = B(Ax)Cx=B(Ax) for every input xxx?

Two Layers Collapse Into One

f(x) = w₂(w₁x + b₁) + b₂ simplifies to a single line.

w₁x + b₁
→
w₂(·) + b₂
Same line, either way. Stacking linear layers never buys extra shape.

Hints

Solve it to unlock the solution

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

Select all that apply.