Skip to content

AI & ML · Machine Learning Math

Matrix calculus & backprop

160 problems in this skill, each with a solver-verified answer key. Answers are checked the moment you submit — with a hint if you want one and a worked solution afterwards.

What the problems look like

A few statements from this skill. Answers, hints and worked solutions live in the practice session.

  1. Warm-up

    A linear layer computes y=Wx\mathbf y = W\mathbf x with W=(2112)W = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}. During backpropagation the upstream gradient is ∂L/∂y=(3,4)\partial L/\partial \mathbf y = (3, 4). The chain rule gives the input gradient ∂L/∂x=W⊤(∂L/∂y)\partial L/\partial \mathbf x = W^{\top}(\partial L/\partial \mathbf y). Compute its first component.

  2. Warm-up

    A linear layer computes y=Wx\mathbf y = W\mathbf x with W=(11−34)W = \begin{pmatrix} 1 & 1 \\ -3 & 4 \end{pmatrix}. During backpropagation the upstream gradient is ∂L/∂y=(3,2)\partial L/\partial \mathbf y = (3, 2). The chain rule gives the input gradient ∂L/∂x=W⊤(∂L/∂y)\partial L/\partial \mathbf x = W^{\top}(\partial L/\partial \mathbf y). Compute its first component.

  3. Warm-up

    A linear layer computes y=Wx\mathbf y = W\mathbf x with W=(2204)W = \begin{pmatrix} 2 & 2 \\ 0 & 4 \end{pmatrix}. During backpropagation the upstream gradient is ∂L/∂y=(4,2)\partial L/\partial \mathbf y = (4, 2). The chain rule gives the input gradient ∂L/∂x=W⊤(∂L/∂y)\partial L/\partial \mathbf x = W^{\top}(\partial L/\partial \mathbf y). Compute its first component.

Problems shown under their original terms: Generated (template, solver-computed).

Practice this free, right now

Unlimited math practice is on the free plan — no card, no trial clock.

See every Machine Learning Math skill for ai & ml