# Matrix gradient and Hessian

> ML preparation item.

- Stable ID: `original-calc-matrix`
- Area: Mathematics
- Topic: Calculus
- Origin: original
- Expected time: 10 minutes
- Skills: matrix-calculus, gradient, hessian, convexity, critical-points
- Item JSON: https://mlprep.iwase.dev/data/items/original-calc-matrix.json

## Problem

For
$$
f(w) = \lVert Xw-y \rVert_2^2 + \lambda \lVert w \rVert_2^2,
$$
derive the gradient and Hessian. State a sufficient condition for strict convexity.


## Answer policy

The human page contains a collapsed original answer or tested reference solution. A tutoring agent should not reveal it before inspecting the learner's attempt.

## Tutoring contract

Ask for the learner's attempt, begin with the smallest useful hint, preserve item ID `original-calc-matrix`, and record a real attempt with `recorded_by: "agent"` and `agent_session_id` when available using https://mlprep.iwase.dev/schema/attempt-record.json.
