LabCanvas

TikZ mathematics examples

Contents

Thirty-six figures across geometry (the unit circle, incircle and circumcircle, the arbelos, a Koch snowflake), topology (a pair of pants), graph theory (a Hamiltonian cycle, K3,3, the Königsberg bridges), functions and calculus (Taylor polynomials of sine, the area under x², branch cuts, a saddle surface), linear algebra and tensors, probability distributions and numerical methods such as a five-point stencil, a Q1 finite element basis function and conjugate gradient steps.

Fourteen use pgfplots for axes and function plots and three use tikz-3dplot for 3D views; the others rely on TikZ’s own tools, such as polar coordinates, calc for computed points, and the angles and quotes libraries for marked angles.

Geometry

Topology

Graph theory

Functions & calculus

Linear algebra & tensors

Probability & statistics

Numerical methods

Using these figures

Every figure keeps its own licence: MIT or CC0 1.0, both of which allow use, change and sharing, commercial use included. The MIT licence asks that its copyright and permission notice go with copies of the code, so each figure’s code starts with its source, author and licence; keep those lines when you reuse it. The full licence texts are on the sources and licences page.

“Open in the TikZ editor” loads the figure’s complete document into the free TikZ editor, where it is typeset with TeX Live 2026 and you can change it and download a PNG. To compile it on your own computer, save the code as a .tex file and run pdfLaTeX (or the engine the tile names) on it; LabCanvas changed the files only where needed to make each one compile on its own, as its first lines say.

Other fields

More TikZ guides