Chris Collins

Areas / Learning

Mathematics

From arithmetic to the mathematics of computing.

Playground ·

Fortran playground

Modern Fortran compiled in your browser by LFortran — whole-array arithmetic, matrix intrinsics, modules and derived types, and a numerical kernel solving the heat equation.

Software engineeringMathematics

Playground ·

R playground

Real R running in your browser through webR — vectors, data frames, a linear model with its summary, simulation, and base-graphics plots.

Software engineeringMathematics

Playground ·

The Mandelbrot set as ASCII art

Nested loops and floating-point arithmetic in eighteen languages — plain loops, complex numbers, whole-array versions in R and BQN, and a recursive query in SQL — all drawing the same 66 × 23 picture, character for character.

Software engineeringMathematics

Tool ·

Mine Sphere

Minesweeper on a globe of hexagons and twelve pentagons — five sizes, three densities, chording, a first click that is always safe, and an optional no-guess board that a built-in solver proves can be cleared by logic.

Retro computingMathematics

Tool ·

Control systems

Enter a plant as a transfer function — polynomials or poles, zeros and gain, continuous or sampled — or pick a DC motor, mass–spring–damper, inverted pendulum, thermal or dead-time preset, add a P, PI, PID or lead/lag controller, and see the step and impulse responses with rise, overshoot, settling and steady-state error, the Bode plot with gain and phase margins, the Nyquist plot, a root locus you drag the gain along, and the closed-loop pole–zero map, with Ziegler–Nichols, IMC and SIMC tuning.

MathematicsElectronics

Tool ·

Kalman filter playground

Tune a Kalman filter live and watch it work — a 1-D value, 2-D tracking with constant-velocity and constant-acceleration models, an extended Kalman filter for a range–bearing sensor, GPS + accelerometer fusion, and complementary filter against Kalman for tilt (with your phone's sensors) — stepping through predict and update with every matrix shown, covariance ellipses, innovations and NIS/NEES consistency against chi-square bounds.

MathematicsElectronics

Tool ·

Reinforcement learning gridworld

A gridworld you paint — walls, pits, goals, wind and slippery ice — solved by value iteration and policy iteration, and learned by Q-learning, SARSA and Expected SARSA with ε-greedy exploration; value heatmap, policy arrows, Q-values per cell, the reward curve, the cliff-walking race between Q-learning and SARSA, and every Bellman backup written out with the live numbers.

Applied AIMathematics

Tool ·

Train a tiny transformer

Train a character-level, decoder-only transformer from scratch in your browser — one to four layers, written in plain JavaScript with a hand-written backward pass checked against finite differences — on Shakespeare's sonnets, nursery rhymes, Carroll and Lear, or your own text, and watch the loss fall, the samples turn into words, the attention heads specialise and the character embeddings sort themselves out.

Applied AIMathematics

Tool ·

Z3 solver playground

Microsoft Research's Z3 SMT solver running in the page — an SMT-LIB editor with readable models, puzzles that show the SMT-LIB they generate (Sudoku, N-queens, SEND+MORE=MONEY, magic squares, job scheduling, exam timetabling), and a small C-like language for proving bit tricks and finding overflow bugs.

MathematicsSoftware engineering

Tool ·

Maths practice gym

Practise the skills from arithmetic to intro calculus — a skill tree of 33 skills, generated problems checked by equivalence, step-by-step checking that names your mistakes, timed drills, an adaptive placement test, and spaced-repetition review, with progress kept in your browser.

Mathematics

Tool ·

Spaced-repetition flashcards

Flashcards for Mathematics, Reconnected, Human Biology for the Medical Maker and the AI Acceleration primer — definitions, formulas, mastery checks and glossaries, each linked to its chapter — plus Big-O and coding interview decks that go with this site's tools — scheduled with FSRS (or SM-2), with cloze cards, your own decks, CSV and Anki import and export, and statistics, kept in your browser.

MathematicsBiology and medicineApplied AI

Tool ·

Classic machine learning, step by step

Classic machine learning on 2-D data you can edit — a decision tree growing split by split with its best-split search, a random forest's bootstrap trees and vote map, gradient boosting round by round, k-NN, logistic regression, a soft-margin linear SVM and Gaussian naive Bayes side by side — and an optimiser lab racing SGD, momentum, Nesterov, AdaGrad, RMSProp, Adam and AdamW over Rosenbrock, Beale, a saddle and an ill-conditioned bowl with learning-rate schedules.

Applied AIMathematics

Tool ·

Digital logic simulator

Build digital circuits by dragging gates, switches, clocks, LEDs and 7-segment displays, watch the signals light up, and go further with flip-flops, counters, adders, an ALU, RAM and ROM, your own sub-circuits, truth tables with minimised expressions, expression-to-circuit, a timing diagram with real gate delays, and a tiny CPU that runs a program.

ElectronicsMathematicsSoftware engineering

Tool ·

Embedding explorer

Load embeddings (CSV, TSV, JSON, GloVe text, the TensorFlow Projector's vectors.tsv + metadata.tsv) or embed sentences in the browser with all-MiniLM-L6-v2, then project them with PCA, t-SNE or UMAP in 2-D or 3-D, colour and search them, list nearest neighbours by cosine or Euclidean distance, cluster with k-means or DBSCAN, score how faithful the map is, and try word analogies.

Applied AIMathematics

Tool ·

Model evaluation workbench

Evaluate a classifier or regressor from its predictions — paste or upload a CSV, or generate a seeded synthetic model — with confusion matrices (micro, macro and weighted precision, recall and F1, MCC, κ), ROC and precision–recall curves (trapezoid AUC against average precision), lift and gain, a cost-matrix threshold chooser, calibration (reliability diagram, ECE, Brier, Platt and isotonic), class imbalance, per-group fairness, and regression residuals.

Applied AIMathematics

Tool ·

Calculus, visually

Drag a secant into a tangent, play the ε–δ game, build f′ from slopes, race Riemann sums, the trapezoid and Simpson's rules on a log–log error plot, paint the area under a curve, and watch Taylor polynomials, linearisation and optimisation work — with every number beside the picture.

Mathematics

Tool ·

Complex numbers, visually

Drag z and w to see addition as vectors and multiplication as rotate-and-scale; modulus and argument with the arctan quadrant trap; Euler's formula with its power series as a spiral of arrows; De Moivre and nth roots; z ↦ wz and z ↦ z² acting on shapes and grids; quadratic roots leaving the real axis; AC phasors and three-phase; and the Mandelbrot set with orbits and the limits of double precision.

Mathematics

Tool ·

Conics, pixels and metrics

Coordinate geometry you can drag: conics from a focus, a directrix and an eccentricity slider (and from slicing a cone), a parabolic reflector, Bresenham, DDA and anti-aliased lines stepped pixel by pixel with the decision value D, Lᵖ unit circles and A* heuristics, the inscribed angle and Thales, a line meeting a circle via the discriminant, and world-to-screen mapping.

Mathematics

Tool ·

Counting, visually

Counting you can see: Pascal's triangle to row 64 coloured mod 2, 3 or 5 with parents and hockey sticks, the binomial theorem as "pick x or y", draggable stars and bars, lattice paths and MISSISSIPPI, an enumerator that shows when a construction counts something twice, derangements and 1/e, next permutation step by step, a backtracking tree with pruning, product-rule stages with password keyspaces, and birthday and hash collisions.

Mathematics

Tool ·

Eigenvectors at work: Markov chains, PCA, SVD

Eigenvectors doing real jobs — a Markov chain editor with its steady state and spectral gap (and PageRank), power iteration, Fibonacci by matrix powers against Binet's formula, the Leslie population model, PCA by rotating a line through a cloud, SVD image compression of your own photo with its rank-1 layers, and latent semantic indexing.

Mathematics

Tool ·

Graph algorithms

Draw a graph (or open one of the book's) and step through the classic algorithms one move at a time: degrees, components and Euler trails; the adjacency matrix and walk counts; BFS racing DFS through a maze; Dijkstra and Bellman–Ford (with a negative edge and currency arbitrage); Kahn's topological sort and the critical path; Kruskal and Prim; greedy and bipartite colouring; Hamiltonian tours by brute force against nearest neighbour; and PageRank by random surfers and power iteration.

Mathematics

Tool ·

Number theory step by step

The working behind the answers — Euclid as a trace table and as square tiles, extended Euclid with back-substitution, the two-jug puzzle, an animated sieve, trial division, clock arithmetic and its cardioids, mod-m tables, % on negative numbers, square-and-multiply against naive powers, repeating decimals, LCGs, check digits, Diffie–Hellman and RSA.

Mathematics

Tool ·

Root finding, step by step

Bisection, Newton, secant and fixed-point iteration side by side, one step per click, with tangents, secants, a cobweb diagram, an iterate table and a log error plot; Newton's failures (flat tangents, cycles, divergence), basins of attraction, the complex z³ − 1 fractal, and Babylonian square roots digit by digit.

Mathematics

Tool ·

Sampling and simulation

Watch probability and statistics happen: the central limit theorem from any distribution (even one you draw), the law of large numbers, confidence-interval coverage, A/B test planning and the cost of peeking, the bootstrap, permutation tests, Simpson's paradox, multiple comparisons, Monty Hall, two-dice events, balls into bins, coupons, inverse-transform and reservoir sampling — all on a seeded generator, so every picture can be linked.

Mathematics

Tool ·

Sets, relations and quantifiers

Paint a three-set Venn diagram from an expression (or find the expression from a painting), linked to its truth table, with inclusion–exclusion counts; explore relations on up to eight dots — reflexive, symmetric, antisymmetric and transitive with witnesses, closures, equivalence classes and Hasse diagrams; and play the ∀∃ against ∃∀ game over a finite domain.

Mathematics

Tool ·

Surfaces, gradients and gradient descent

Type f(x, y) and see a rotatable 3-D surface, contours and a heat map, linked; partial derivatives as slices; the gradient field and a directional-derivative dial; the tangent plane and its error; critical points classified by the Hessian; Lagrange multipliers with λ as a shadow price; a double integral as columns that refine; and an optimiser race of gradient descent, momentum and Adam.

Mathematics

Tool ·

Test accuracy and risk

A diagnostic test's 2×2 table from counts or from sensitivity, specificity and prevalence, drawn as 1,000 people; PPV and NPV against prevalence; ROC curves with a threshold slider and AUC; alarms as a low-prevalence test; relative versus absolute risk and NNT; and why reference ranges flag healthy people.

Biology and medicineMathematics

Tool ·

The maths of machine learning

The mathematics under machine learning, hands on — least squares with draggable points (residual squares, outliers, L1 vs L2, normal equations vs gradient descent and SGD), logistic regression and its cross-entropy bowl, a computation graph with forward and backward passes against dual numbers and finite differences, TF-IDF and BM25 search, entropy with a Huffman tree builder and KL divergence, and softmax temperature with an attention matrix.

MathematicsApplied AI

Tool ·

Unit circle and waves

Drag round the unit circle and watch it unwrap into sin and cos, with quadrants, reference angles and exact values; find every solution of sin x = k; see radians as arc length and sin θ/θ → 1; fit A sin(B(x − C)) + D to the book's daylight and tide data; watch simple harmonic motion as the shadow of circular motion; and aim a turret with atan, atan2, y-down screens and the degrees bug.

Mathematics

Tool ·

Where floating point bites

Watch rounding error happen: the V-shaped error of forward, central and complex-step derivatives in float16, float32 and float64; the quadratic formula losing digits and its stable rewrite; (1 + 1/n)ⁿ collapsing to 1; summation order and Kahan's cash register; Horner versus naive evaluation; forward versus backward recurrences; an ill-conditioned 2×2 system; partial pivoting; and Runge's phenomenon.

Mathematics

Tool ·

Algebra step by step

Solve linear equations, inequalities, quadratics and simultaneous equations with every step explained; divide and factor polynomials; explore a quadratic in four synchronised views with a draggable vertex, watch its roots move through the complex plane, draw sign charts for quadratic and rational inequalities; slide a, b, h and k to transform a graph; and practise with generated problems that check your answers.

Mathematics

Tool ·

Linear systems, visually

Enter a system of linear equations and see it — lines in 2-D, planes in 3-D — then solve it yourself with exact row operations (swap, scale, add a multiple) with undo, hints and "show me", while the picture updates. Classifies one / none / infinitely many solutions, and shows Cramer's rule and least squares. Plus linear programming with a sliding objective line, and an ill-conditioning demo.

Mathematics

Tool ·

Matrix transformations

See what a 2×2 or 3×3 matrix does: the grid, the unit square or cube, the basis vectors and a shape move live as you edit entries or drag the columns — animated from the identity, with the determinant as signed area or volume, eigenvectors, composition, the inverse, presets, the SVD as rotate–stretch–rotate, rotation about a pivot with 3×3 homogeneous matrices, and a neural-network layer folding the plane with ReLU.

Mathematics

Tool ·

Vectors playground

Drag vectors in 2-D or a rotatable 3-D view and watch sums, linear combinations, dot and cross products, norms and Lᵖ circles, span and linear independence, and change of basis update live — with every number beside the picture — and see why random directions in high dimensions are nearly perpendicular.

Mathematics

Tool ·

Neural network designer

Build a multi-layer neural network from a palette, see every tensor shape and parameter count, draw it, train small ones live in the browser, and generate runnable PyTorch, Keras 3, JAX/Flax or plain NumPy code.

MathematicsApplied AI

Tool ·

Big-O explorer and benchmark

Compare growth curves, see how big an input fits a time budget, benchmark your own JavaScript to find its complexity class, look things up in a colour-coded Big-O cheat sheet, watch sorting algorithms run, and see where the costs come from: Fibonacci call trees, recursion trees, binary-search halving, and amortised appends — and why attention is O(N²) in context length, what an SSM's O(N) buys, and what a KV cache saves. Then revise for interviews: name the complexity of code snippets, drill data-structure operation costs, and solve recurrences with the master theorem.

Software engineeringMathematics

Tool ·

Boolean logic

Truth tables with a column for every sub-expression, push negations inward one named law at a time, brute-force SAT on CNF clauses, Quine–McCluskey minimisation with Karnaugh maps and gate diagrams, equivalence checks, and register bitfields.

MathematicsElectronicsSoftware engineering

Tool ·

Floating-point inspector

See exactly how float64, float32, float16, bfloat16, TF32, the FP8, FP6, and FP4 formats used for AI, and the E8M0 scale store a number — and how block-scaled formats (OCP MX, NVIDIA NVFP4, NF4) build a tensor from tiny elements and shared scales.

Software engineeringMathematics

Tool ·

Fourier series

See how sums of sines build any periodic function: coefficients and partial sums for square, sawtooth, triangle, custom, or hand-drawn waves, the Gibbs phenomenon and Fejér smoothing, amplitude and phase spectra, rotating epicycles, a draw-any-shape complex Fourier demo, the DFT as arrows that line up or cancel, and the N² against N log N cost of the FFT.

Mathematics

Tool ·

Geometry: triangles, circles, polygons, solids

Solve any triangle from three values (including both answers of the ambiguous SSA case) with a drawing; arcs, chords, and rise; circle through three points; regular polygons with mitre angles; volumes and surface areas of solids; and coordinate geometry with shoelace area.

MathematicsWoodworking

Tool ·

Grammar and parser playground

Write a PEG grammar, parse input with it live, and inspect the result tree, JSON, tokens, and rule cross-references — then download the generated parser. Or see one expression parsed under five precedence conventions — PEMDAS, implied multiplication, Python, C and Excel — as trees.

Software engineeringMathematics

Tool ·

Graphing calculator

Plot functions, parametric and polar curves with live parameter sliders; find roots, extrema, and intersections; show derivatives and integrals; and use a scientific calculator.

Mathematics

Tool ·

Matrix calculator

Linear algebra with exact fractions or decimals — products (stepped row × column), determinant, inverse, rank, RREF step by step, Ax = b, null space, LU, QR, eigenvalues and eigenvectors (with the 2×2 procedure by hand), norms, and condition number.

Mathematics

Tool ·

Number theory

Arbitrary-precision integer tools — primality, factorisation, divisor functions, GCD and modular arithmetic, the Chinese remainder theorem, bases, repeating decimals, continued fractions, big factorials, and Roman numerals.

Mathematics

Tool ·

ODE solver and phase portraits

Solve systems of ordinary differential equations with Euler, RK4, or adaptive Dormand–Prince RK45; see time series and phase portraits with direction fields, nullclines, clicked trajectories, classified equilibria, and a rotatable 3-D view. Plus a slope field with Euler's method against the exact solution, and an integrator shoot-out showing energy drift.

MathematicsBiology and medicine

Tool ·

Probability: dice, cards, Bayes

Exact dice distributions with a chart; exact permutations and combinations; poker and lottery odds; the birthday problem; binomial, hypergeometric, geometric, and Poisson; Bayes with a natural-frequency tree and icon array; Bloom filters; a naive-Bayes spam filter; series/parallel reliability; expected value and Monte Carlo.

Mathematics

Tool ·

Programmer's calculator

Integer expressions with hex, binary, and octal; 8- to 128-bit words; signed or unsigned; bitwise operators, rotates, and a clickable bit grid; an n-bit overflow clock with signed and unsigned labels; and what n bits hold, with the KB versus KiB gap.

Software engineeringMathematics

Tool ·

Statistics

Paste data and get descriptive statistics, histograms and box plots, regression with R² and residuals, correlation matrices, distribution calculators, and hypothesis tests with plain-language results.

Mathematics

Tool ·

Symbolic algebra

A computer algebra system in the browser: simplify, expand, factor, solve equations and systems, differentiate, integrate, take limits and Taylor series, partial fractions, and substitution — with LaTeX output, a step history, and a plot.

Mathematics