Queensland University of Technology · FACULTY OF MATHEMATICS

MZB127 Chap.2 Chain Rules, Gradients and Optimisation

- one subject, every graph, every model, every mark
5 Chapters3-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 2 of 11 · MZB127

Chain Rules, Gradients and Optimisation

Multivariable chain rules add the contributions from every dependency path between an input and an output. The gradient packages coordinate slopes into a vector, while a directional derivative projects that vector onto a unit direction. The chapter also treats implicit rates and unconstrained stationary-point classification, with emphasis on normalising directions and applying the second-derivative test at the candidate point.

A dependency diagram reveals whether a total rate needs one path contribution or several. Each route multiplies derivatives along its edges, and contributions that reach the same output are added. The gradient collects all coordinate partials at one point and points in the direction of steepest local increase.

Dotting it with a unit vector gives the rate in a requested direction; using a non-unit vector incorrectly scales that rate. Implicit differentiation applies the same dependency logic when variables are connected by an equation rather than solved explicitly. For optimisation, simultaneous zero first partials locate candidates, not conclusions.

The Hessian determinant and a leading second derivative then classify a regular candidate as a local minimum, maximum or saddle. A zero determinant leaves the standard test inconclusive, so the classification must not be guessed from one curvature value. These ideas connect path structure, vector geometry and local curvature in one decision sequence.

In this chapter

What this chapter covers

  • 01

    Dependency diagrams and path products

  • 02

    Multivariable chain rules

  • 03

    Implicit differentiation from constraints

  • 04

    Gradient and directional derivative

  • 05

    Stationary points and Hessian classification

Worked example · free

Add two dependency paths

Q [4 marks]. The mark allocation shown here is not an official university assessment scheme. For z=x squared plus xy, x=t squared and y=3t, calculate dz/dt at t=1 using path products.
The derivative from t to z is the sum of two path products, one travelling through x and the other through y.The derivative from t to z is the sum of two path products, one travelling through x and the other through y.txyzdx/dtdy/dt∂z/∂x∂z/∂yadd both path products
The derivative from t to z is the sum of two path products, one travelling through x and the other through y.
  • 1Find z sub x and z sub y.
  • 1Find dx/dt and dy/dt.
  • 1Add the two path products at t=1.
  • 1Verify by direct composition.
The two path products are 10 and 3, so dz/dt=13. Directly differentiating t to the fourth plus 3t cubed gives the same value at one.
Sia tip — Trace every route from the differentiation variable to the output; one product belongs to each route.
Glossary

Key terms

Dependency path
A route through intermediate variables by which one input changes an output.
Gradient
The vector containing all first partial derivatives of a scalar function.
Directional derivative
The gradient dotted with a unit vector in the requested direction.
Stationary point
A point where all first partial derivatives are zero.
Saddle point
A stationary point that rises in some directions and falls in others.
FAQ

Chain Rules, Gradients and Optimisation FAQ

Why are chain-rule terms added?

Each intermediate variable provides a distinct route by which the input changes the output. Rates multiply along one route and contributions add across routes, so omitting a route removes a real source of change from the model.

Why must a direction vector be normalised?

A directional derivative measures change per unit distance. Dotting with a non-unit vector scales the result by that vector's length and no longer reports the requested per-unit rate.

What if the second-derivative determinant is zero?

The standard two-variable test is inconclusive. The point must be classified using another argument, such as direct comparison, higher-order terms or the behaviour of the function along carefully chosen paths.

How can a multivariable chain rule be checked?

When direct substitution is manageable, compose the intermediate variables into the output first and differentiate the resulting one-variable expression. Its derivative should match the sum of path products. The comparison checks both missing dependency routes and derivatives attached to the wrong edge without relying on the same written formula twice.

Study strategy

Exam move

Draw a dependency diagram before writing a chain rule and label every edge with its derivative. For directional rates, write the vector length and unit direction explicitly. For optimisation, solve both first-partial equations, evaluate the determinant and f sub xx at the candidate, and state the classification only after those signs are visible. Use direct composition as an independent check when it is manageable.

Build fluency by alternating between diagrams and formulas. Given a composite function, draw every intermediate variable and trace all routes from the changing input to the final output before differentiating. Then cover the formula and reconstruct it from the paths.

For gradient questions, calculate the coordinate partials symbolically, substitute the point once, and write the resulting vector with the same coordinate order as the question. Put direction normalisation on its own line and verify the final vector has length one before taking the dot product. Compare the directional rate with the gradient magnitude; its absolute value cannot exceed the steepest rate.

For implicit rates, differentiate every term with respect to the driving variable and attach derivative factors to dependent quantities. For optimisation, maintain a three-column ledger: candidate equations, Hessian data and classification. Evaluate all curvature quantities at the same candidate and label an inconclusive determinant honestly.

Sketch a few contours around minima, maxima and saddles so the determinant signs acquire geometric meaning rather than becoming a memorised table. After each solution, use either direct composition, a nearby-value check or a contour argument as an independent audit. In timed practice, spend the first minute identifying paths, direction length or candidate conditions.

That investment prevents the structural errors that cannot be repaired by accurate algebra later.

Working through Chain Rules, Gradients and Optimisation in MZB127? Sia is AskSia’s AI Mathematics tutor — ask any MZB127 Chain Rules, Gradients and Optimisation question and get a clear, step-by-step explanation grounded in how MZB127 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 16 of your Queensland University of Technology subjects - and 1,000+ Bibles across every Australian university.
Sia - your MZB127 tutor, unlimited, worked the way the exam marks it
The full 3-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works