# Stanford Math 51 Linear Algebra and Multivariable Calculus Guide

> A study guide for Stanford Math 51: vectors, matrices, eigenvalues, gradients, Hessians, Lagrange multipliers and the chain rule, mapped to free practice.

Source: https://practicecalculus.com/courses/stanford-math-51
Updated: 2026-11-03

## At a glance

- **Course code:** MATH 51
- **Units:** 5
- **Offered:** Autumn, winter and spring quarters (2026-27)
- **Prerequisites:** MATH 21
- **Covers:** Orthogonality, linear independence, matrix algebra and eigenvalues, least squares and Markov chains, gradients and Hessians, Lagrange multipliers, gradient descent, the multivariable chain rule and Newton's method
- **Equivalent:** MATH 61CM (credit is not granted for both)
- **Next course:** MATH 52 (Integral Calculus of Several Variables) or MATH 53 (Differential Equations)
- **Practice here:** [Calculus 3](/learn/calculus-3), vectors and partial derivatives units

## Key takeaways

- Math 51 combines linear algebra with multivariable differential calculus in one 5-unit course.
- The calculus half covers gradients, Hessians, constrained optimization with Lagrange multipliers, gradient descent, the chain rule and Newton's method.
- Math 21 is required to enroll, and Math 51 is equivalent to the proof-based Math 61CM.
- Multivariable integration is covered afterward in Math 52.

**Stanford Math 51** is where Stanford students meet calculus in several variables, and it does so together with linear algebra. Taken after [Math 21](/courses/stanford-math-21), it is the foundation for Math 52 and Math 53. This guide focuses on the multivariable calculus and vector topics, mapping each one to free practice with instant feedback, and notes where the linear algebra fits in.

## What Stanford Math 51 covers

Stanford's catalog describes Math 51 as unified coverage of linear algebra and multivariable differential calculus, supported by a free course e-text. The linear algebra portion includes orthogonality, linear independence, matrix algebra and eigenvalues, with applications such as least squares, linear regression and Markov chains, and an introduction to the singular value decomposition. The calculus portion covers unconstrained optimization with gradients and Hessians, constrained optimization with Lagrange multipliers, gradient descent, the multivariable chain rule and Newton's method. The emphasis is on computation together with an intuitive grasp of the ideas.

Measured against a standard sequence, Math 51 covers the differential half of **Calculus 3** plus most of an introductory linear algebra course. Multiple integrals and vector calculus come in Math 52.

## Math 51 topic map

| Math 51 topic | Practice | Read |
| --- | --- | --- |
| Vectors and length | [Vectors and their length](/learn/calculus-3/vectors-and-space/vectors-and-length) | [Dot and cross product](/blog/vectors-dot-and-cross-product) |
| Dot product and orthogonality | [The dot product](/learn/calculus-3/vectors-and-space/dot-product) | [Dot and cross product](/blog/vectors-dot-and-cross-product) |
| Projections and least squares ideas | [Projections and work](/learn/calculus-3/vectors-and-space/projections-and-work) | [Dot and cross product](/blog/vectors-dot-and-cross-product) |
| Lines and planes | [Planes in space](/learn/calculus-3/vectors-and-space/planes-in-space) | [Linear function](/functions/linear-function) |
| Functions of several variables | [Functions of several variables](/learn/calculus-3/partial-derivatives/functions-of-several-variables) | [Partial derivatives guide](/blog/partial-derivatives) |
| Partial derivatives and the gradient | [The gradient](/learn/calculus-3/partial-derivatives/gradient-and-directional-derivatives) | [Gradient and directional derivatives](/blog/gradient-and-directional-derivatives) |
| Hessians and second derivatives | [Second partial derivatives](/learn/calculus-3/partial-derivatives/second-partial-derivatives) | [Clairaut's theorem](/theorems/clairauts-theorem) |
| Unconstrained optimization | [Second-derivative test](/learn/calculus-3/partial-derivatives/critical-points-and-second-derivative-test) | [Optimization problems](/blog/optimization-problems) |
| Constrained optimization | [Lagrange multipliers](/learn/calculus-3/partial-derivatives/lagrange-multipliers) | [Lagrange multipliers guide](/blog/lagrange-multipliers) |
| Multivariable chain rule | [The multivariable chain rule](/learn/calculus-3/partial-derivatives/multivariable-chain-rule) | [Chain rule](/rules/chain-rule) |
| Linear approximation and Newton's method | [Tangent planes](/learn/calculus-3/partial-derivatives/tangent-planes) | [Linear approximation](/blog/linear-approximation) |

Matrix algebra, eigenvalues and the singular value decomposition are linear algebra topics we do not have lessons for yet.

## Math 51 and its neighbors

| Course | Units | Focus |
| --- | --- | --- |
| Math 21 | 4 | Single-variable series, required for Math 51 |
| Math 51 | 5 | Linear algebra and multivariable differential calculus |
| Math 61CM | 5 | Proof-based treatment, equivalent to Math 51 |
| Math 52 | 5 | Multivariable integration and vector calculus |
| Math 53 | 5 | Differential equations with linear algebra and Fourier methods |

Credit is not granted for both Math 51 and Math 61CM. After Math 51, read the [Math 52 guide](/courses/stanford-math-52).

## Example problems at the Math 51 level

**1. A gradient.** For $f(x, y) = x^2 y + 3y^2$, $\nabla f = \langle 2xy, x^2 + 6y \rangle$, so $\nabla f(1, 2) = \langle 4, 13 \rangle$.

**2. A critical point with the Hessian.** For $f(x, y) = x^2 + xy + y^2$, the gradient $\langle 2x + y, x + 2y \rangle$ is zero only at $(0, 0)$. The Hessian is

$$H = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}, \qquad \det H = 3 > 0, \quad f_{xx} = 2 > 0$$

so $(0, 0)$ is a local minimum.

**3. Lagrange multipliers.** Maximize $f = xy$ subject to $x + y = 10$. Setting $\langle y, x \rangle = \lambda\langle 1, 1 \rangle$ gives $x = y = 5$, so the maximum is $25$.

## How to do well in Stanford Math 51

- **Tie every concept to a picture.** Gradients point uphill, level sets are perpendicular to them, and eigenvectors are directions a matrix only stretches. Drawing these makes the algebra memorable.
- **Practice the calculus separately.** The [partial derivatives practice](/learn/calculus-3/partial-derivatives/partial-derivatives-practice) set builds speed so exam time goes to the harder linear algebra reasoning.
- **Review single-variable optimization** with the [second derivative lesson](/learn/calculus-1/applications-of-derivatives/second-derivative), since the Hessian test generalizes it.
- **Use the [formula sheet](/formulas)**, timed [practice exams](/practice), and the [common calculus mistakes](/blog/common-calculus-mistakes) list as you prepare for midterms.

## Frequently asked questions

### What is Stanford Math 51?

Math 51, Linear Algebra, Multivariable Calculus, and Modern Applications, teaches linear algebra and the differential calculus of several variables together. It covers vectors, matrices, eigenvalues and least squares alongside gradients, Hessians, constrained optimization and the multivariable chain rule.

### What do I need before Math 51?

Math 21 is required. The department notes that its diagnostic does not waive this requirement, so students need Math 21 credit or an approved equivalent.

### What comes after Math 51?

Math 52 covers integral calculus of several variables, including line and surface integrals and the theorems of Green, Gauss and Stokes. Math 53 covers differential equations. Both build on Math 51 and can be taken in either order.

### Is Math 51 hard?

Math 51 asks students to learn two subjects at once, and the linear algebra is new to most of them. Keeping up weekly and connecting each idea to a picture in two or three dimensions helps a lot.

### Math 51 vs CME 100: which should I take?

Both require Math 21. The Stanford math department publishes an FAQ comparing them on its placement page, and Math 51 is the course the catalog notes CS 229 and CS 230 recommend.
