Home / Maths for AI / Symbols / Sums, products and sets

For all

Say it: "for all", "for every"

What it means

∀x\forall x means "for every x". ∃\exists means "there exists (at least one)".

Example

∀x∈R:x2≥0\forall x \in \mathbb{R}: x^2 \ge 0

Every real number squared is zero or more.

In code

import numpy as np
xs = np.linspace(-5, 5, 11)
print(np.all(xs ** 2 >= 0), np.any(xs ** 2 == 0))

Output

True True

Where it appears in machine learning

Used to state rules and guarantees, such as "for all inputs, the probabilities sum to 1".

Related symbols

Learn it properly in the free lesson Reading ML Maths, with practice questions that check your answers.