Lesson 10 of 12 · Reading Maths
Greek Letters You Will Meet
A friendly guide to the Greek letters and symbols used in AI and machine learning: theta, alpha, lambda, mu, sigma, epsilon, hats, bars and subscripts, with Python translations.
- 8 min read
- Beginner
- Reviewed
- Why maths uses Greek letters
- The Greek letters you will meet most in AI, and their usual meanings
- What hats, bars, subscripts and superscripts mean
- How to translate a formula with Greek letters into Python
Why Greek letters?
Maths needs many names for many kinds of quantity, and the Latin alphabet runs out quickly. Greek letters give extra names. Over time, many of them gained traditional meanings: when an AI paper writes θ, it almost always means "the model's parameters".
You do not need to memorise the whole alphabet. A dozen letters cover nearly everything you will read.
The letters you will meet
| Letter | Name | Usual meaning in AI |
|---|---|---|
| θ | theta | model parameters |
| α, η | alpha, eta | learning rate |
| β | beta | a coefficient, or a setting of the Adam optimiser |
| γ | gamma | discount factor in reinforcement learning |
| λ | lambda | regularisation strength |
| μ | mu | mean |
| σ | sigma | standard deviation, or the sigmoid function |
| Σ | Sigma | sum |
| Π | Pi | product |
| π | pi | 3.14159..., or a policy in reinforcement learning |
| ε | epsilon | a tiny number |
| Δ, δ | delta | change, small difference |
| ∇ | nabla (not Greek) | gradient: the direction of steepest increase |
Marks on top and underneath
Letters often carry small marks that change their meaning:
Translating a formula into Python
Here is the prediction formula of a linear model, written the way a paper would:
ŷ = θ₀ + θ₁xRead it as: "the prediction equals theta-zero plus theta-one times x". θ₀ is the intercept and θ₁ is the slope. You already know this line from the Linear Functions lesson, just with new names.
theta_0 = 2.0 # θ₀, the intercept
theta_1 = 0.5 # θ₁, the slope
xs = [0, 4, 10]
for x in xs:
y_hat = theta_0 + theta_1 * x # ŷ = θ₀ + θ₁x
print(f"x = {x}: y_hat = {y_hat}")And here is one step of gradient descent, the update rule at the heart of training. You will learn where it comes from in the calculus course. For now, just practise reading it:
θ ← θ - α · ∇L(θ)"Update theta: take theta, minus alpha times the gradient of the loss." In plain words: move the parameters a small step (α) in the direction that reduces the error.
theta = 5.0 # current parameter value
alpha = 0.1 # learning rate α
gradient = 4.0 # ∇L(θ): how fast the loss grows as θ grows
theta = theta - alpha * gradient
print("Updated theta:", theta)The arrow ← means "becomes", exactly like = in Python.
Python and Greek letters
Python actually allows Greek letters in variable names, but most teams avoid them because they are hard to type. The standard style is to spell them out:
mu = 50.0 sigma = 10.0 epsilon = 1e-8 x = 65.0 z = (x - mu) / (sigma + epsilon) # how many standard deviations above the mean print(round(z, 3))
Common mistakes
Translate a formula full of Greek letters and marks into Python.
# A model predicts with: ŷ = θ₀ + θ₁x # with θ₀ = 1 and θ₁ = 3. # The true values y are given below for each x. # 1. For each x, work out y_hat and the error (y - y_hat). # 2. Then work out the mean of the errors, written ē (e-bar). xs = [1, 2, 3] ys = [5, 6, 11] # Output must be exactly: # x=1 y=5 y_hat=4 error=1 # x=2 y=6 y_hat=7 error=-1 # x=3 y=11 y_hat=10 error=1 # e_bar = 0.333
In an AI paper, what does ŷ usually mean?
Summary
- Greek letters give maths extra names, and many have traditional meanings in AI.
- θ is the parameters, α or η the learning rate, λ regularisation, μ the mean, σ the spread (or sigmoid) and ε a tiny number.
- A hat (ŷ) means a prediction. A bar (x̄) means a mean. A superscript in brackets is a label, not a power.
- Read formulas out loud, then translate them line by line into Python.
Next: sets and intervals, the language for describing groups of values.
Finished reading? Tick it off to track your progress.