practicecalculus
Stanford University

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.

Stanford University Updated 3 min read

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, vectors and partial derivatives units
On this page
  1. What Stanford Math 51 covers
  2. Math 51 topic map
  3. Math 51 and its neighbors
  4. Example problems at the Math 51 level
  5. How to do well in Stanford Math 51

Stanford Math 51 is where Stanford students meet calculus in several variables, and it does so together with linear algebra. Taken after 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 Dot and cross product
Dot product and orthogonality The dot product Dot and cross product
Projections and least squares ideas Projections and work Dot and cross product
Lines and planes Planes in space Linear function
Functions of several variables Functions of several variables Partial derivatives guide
Partial derivatives and the gradient The gradient Gradient and directional derivatives
Hessians and second derivatives Second partial derivatives Clairaut's theorem
Unconstrained optimization Second-derivative test Optimization problems
Constrained optimization Lagrange multipliers Lagrange multipliers guide
Multivariable chain rule The multivariable chain rule Chain rule
Linear approximation and Newton's method Tangent planes 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.

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 set builds speed so exam time goes to the harder linear algebra reasoning.
  • Review single-variable optimization with the second derivative lesson, since the Hessian test generalizes it.
  • Use the formula sheet, timed practice exams, and the common calculus mistakes list as you prepare for midterms.

Practice it now

Vectors and their length

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

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.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.