Runoob Tutorial ArchiveEnglish

Common Mathematical Symbols

Common Mathematical Symbols

The first hurdle to understanding AI papers and tutorials is often not the mathematics itself, but the pages full of mathematical symbols.

9 3c3 e bd6f 4747 8b96 9d1c9 81abbd

This chapter compiles the most commonly used symbols in AI learning into a table. You can take a general look first, or refer to it later when you need to look up specific symbols:

Most symbols are accompanied by runnable Python examples; calculating it yourself is more effective than reading it ten times.


Numbers and basic operations

These symbols have been used since elementary school math and form the foundation of all formulas.

Symbols Meaning Example
Addition, subtraction, multiplication, division
Plus and minus signs, indicating two possible values
Not equal to
Less than, greater than, less than or equal to, greater than or equal to
Approximately equal to
Absolute value, remove negative sign
Square root
n-th root
Square, n-th power
Reciprocal (negative exponent)
Factorial, multiplying from 1 up to n
Infinity

In papers, the multiplication sign is often omitted or written as a small dot:Represents w multiplied by x; both notations have the exact same meaning.


Variable and letter conventions

In mathematics, letters are not chosen arbitrarily; different letters have default roles.

Letters Default role Typical meaning in AI context
Constant Fixed coefficient
Variable x is the input feature, y is the output label
Weights and biases Parameters that the neural network needs to learn
Set of parameters A general term for all model parameters, pronounced theta
Number Number of samples, feature dimension
Pi
Natural constant

Note the distinction when using x and X simultaneously:Lowercase usually denotes a single number (scalar), while uppercase usually denotes a matrix, which will be elaborated in the lowercase section.

SeeDon't panic, it's just a notational convention for "parameters" andhas no essential difference; the paper authors choose based on preference.


Exponent and logarithm

The pair of functions that appears most frequently in AI.

Appears in sigmoid and softmax, responsible for "amplifying or compressing" values; appears in cross-entropy loss, responsible for "turning multiplication into addition."

Symbol Meaning Example
a to the power of n
The 0th power of any non-zero number
Exponential function with base e
Logarithm of x with base a
Natural logarithm (base e)
Usually refers to in papers

The four arithmetic rules must be proficient, as they are repeatedly used when deriving the loss function:

The change of base formula can convert the logarithm of any base to the natural logarithm, which is commonly used in programming:

Example

Calculate log_2(100) using the change of base formula

Python's math.log(x, base) does this internally

import

math

x

=

100

base

=

2

Direct call

print

(

math

.

log

(

x

,

base

)

)

Handwritten base change formula: log_2(100) = ln(100) / ln(2)

print

(

math

.

log

(

x

)

/

math

.

log

(

base

)

)

The output of the above code is:

6.643856189774725

6.643856189774725

Why add a small constant ε?: The argument of the logarithm must be greater than 0, but in the early stages of training, the model may output a probability of 0, which will result in negative infinity and cause training to crash.

Therefore, it is usually written as in the implementation, where ε is a very small positive number, such as 0.0000001.


Function symbols

A function is the "rule mapping input to output"; a neural network is essentially a composition of many layers of functions.

Symbols Meaning Example / Description
The result of mapping x through f
f maps elements of set A to set B The "type signature" of a function
Inverse function, undoing the operation of f
Composite function, calculating g(x) first and then substituting into f
The change in x
The predicted value of y (pronounced y-hat) Distinguish from the true label y
sigmoid activation function

In machine learning(pronounced y-hat) specifically refers to the model's predicted value,refers to the true label, and the difference between the two is the prediction error.

Composite functions are key to understanding neural networks: a two-layer network is essentially , and backpropagation calculates gradients layer by layer, relying on the chain rule of differentiation for composite functions.

Example

Composite function calculation: y = f(g(x))

Let g(x) = x + 1, f(x) = x^2

def

g

(

x

)

:

   

return

x +

1

         

inner function

def

f

(

x

)

:

   

return

x **

2

       

Outer function

Composition: first calculate g(x), then substitute the result into f

print

(

f

(

g

(

3

)

)

)

           

g(3)=4, f(4)=16

print

(

f

(

g

(

3

)

)

==

(

3

1

)

**

2

)

The output of the above code is:

16

True


Summation and integration

It is the symbol with the highest appearance rate in AI formulas, without exception.

It means: let the subscript i range from the lower limit to the upper limit, and add up each term.

Read as "sum of x to the power of i from 1 to n". Read a summation formula in three steps:

Steps What to look at In this example
1 Which variable is the summation index (subscript) i
2 Summation range (lower bound to upper bound) 1 to n
3 What each term looks like

Summation symbol, the structure is the same, only replacing "add" with "multiply":

The two most common AI formulas are based on summation:

Mean Squared Error loss:

Weighted sum of neurons:

Example

Experience summation with code: z = sum(w_i * x_i) + b

w

=

[

0.5

,

1.0

,

2.0

]

 

Weight, corresponding to w_i in the formula

x

=

[

2.0

,

 

3.0

,

1.0

]

 

Input, corresponding to x_i in the formula

b

=

0.1

               

Bias

sum_{i=1}^{3} w_i * x_i is the following line

z

=

sum

(

wi * xi

for

wi

,

xi

in

zip

(

w

,

x

)

)

print

(

z

)

Expand verification: 0.5*2 + (-1.0)3 + 2.01 + 0.1

print

(

0.5

2

(

1.0

)

3

2.0

1

0.1

)

The output result of the above code is:

0.1

0.1


Sets and Logic

Set symbols describe "which category the data belongs to," and logic symbols describe "how conditions are combined," which are heavily used in probability and machine learning theory.

Symbols Meaning Example
Belongs to
Does not belong to
Subset
Union
Intersection
Empty set (contains no elements)
Set of real numbers
For all, every (universal quantifier)
There exists (existential quantifier)
Logical negation
Logical AND, Logical OR
Implies, Entails
Equivalence (if and only if)

These symbols most often appear in the theorem and assumption sections of papers, for example, ""read as" for any epsilon greater than 0, there exists an N".


Subscripts and value ranges

This section addresses two common confusions: what subscripts mean, and how to read interval symbols.

Subscripts: Numbering variables of the same type

Since using x to represent many samples in the training data would be confusing, subscripts are used to distinguish them: .

When there are two subscripts, such as [i][j], it usually denotes "row i, column j," which is an element of a matrix.

A vector is denoted as $\mathbf{v}$ (bolded), and its components are $v_i$; the shape of a matrix is described as "number of rows $\times$ number of columns," denoted as $m \times n$.

Intervals and ranges of values

Parentheses indicate "excluding endpoints," and square brackets indicate "including endpoints."

Symbols Reading Meaning
Open interval all numbers between a and b, excluding the endpoints
closed interval all numbers between a and b, including the endpoints
half-open interval includes b but excludes a
x belongs to the closed interval x takes a value between 0 and 1, including the endpoints

the range of the sigmoid function is (0, 1), this open interval means the output is always strictly greater than 0 and less than 1, which is the mathematical reason it can be used as a "probability".


Greek alphabet

Greek letters in papers are not decorative; each has a default meaning, and recognizing them will make reading papers much smoother.

Uppercase Lowercase Name Common meanings in AI
alpha learning rate
beta momentum coefficient, Adam's second moment decay rate
gamma discount factor (reinforcement learning)
delta change amount, increment
epsilon tiny positive number, exploration probability
theta Model parameters
lambda Regularization coefficient
pi Strategy (Reinforcement Learning), Pi
sigma Summation / sigmoid function, Standard deviation
phi Feature mapping function
omega Model weights (some papers)

The same symbol has different meanings in different fields:In the context of activation functions, it is sigmoid; in the statistical context, it is standard deviation; in the summation formula, it is uppercaseis the summation operator. Look at the context first to understand the meaning; this is the most important habit when reading papers.


Probability and statistics

The core language of machine learning. The "confidence" output of classification models, the derivation of loss functions, and Bayesian methods are all built upon these symbols.

Symbol Meaning Example / Description
Probability of event A occurring
Conditional probability: Probability of A given B The vertical line is read as "given..."
Joint probability: A and B occurring simultaneously
Bayes' theorem The foundation of all Bayesian methods
Expectation (mean)
Variance (degree of dispersion)
Mean The center of the data distribution
Variance (sigma squared)
Follows a ... distribution
Normal distribution (Gaussian distribution) The values in parentheses are the mean and variance
Information entropy

Cross-entropy loss is the culmination of these symbols, combining summation, conditional probability, and arrays:

Breaking down each symbol: $y_i$ is the true label for the i-th sample, $\hat{y}_i$ is the model's predicted probability, and turning the product of probabilities into a sum, the negative sign makes "smaller loss better."

$\mathcal{N}$ is the calligraphic form of "Normal," referring to the normal distribution, not the letter N. Calligraphic symbol$\Sigma$,are commonly used to represent "set-like" objects such as distributions, loss functions, and datasets.


Linear Algebra

The underlying structure of neural networks. Every matrix operation in a deep learning framework uses these symbols.

Symbol Meaning Example / Description
Vector ($\mathbf{v}$)
Matrix ($\mathbf{A}$) An m-row n-column array
Transpose: swapping rows and columns Row vector to column vector
Matrix multiplication Not element-wise multiplication
Element-wise multiplication (Hadamard product) Multiplication of corresponding elements of matrices of the same shape
Norm (the "length" of a vector)
L1 norm: sum of absolute values Fundamentals of Regularization
Matrix Inverse
Identity Matrix Diagonal elements are 1, others are 0
Dot Product (Inner Product)

The dot product is the backbone of the attention mechanism: every layer in a transformer calculates the dot product between query and key vectors to measure their "similarity".

Example

Correspondence between Dot Product and L2 Norm

x · y = sum(x_i * y_i), ||x||_2 = sqrt(sum(x_i^2))

import

math

x

=

[

1.0

,

2.0

,

3.0

]

y

=

[

4.0

,

0.0

,

1.0

]

dot product x · y

dot

=

sum

(

xi * yi

for

xi

,

yi

in

zip

(

x

,

y

)

)

print

(

dot

)

L2 norm ||x||_2

norm2

=

math

.

sqrt

(

sum

(

xi **

2

for

xi

in

x

)

)

print

(

norm2

)

Expand verification

print

(

1.0

4.0

2.0

0.0

3.0

(

1.0

)

)

print

(

math

.

sqrt

(

1

4

9

)

)

The output of the above code execution is:

1.0

3.7416573867739413

1.0

3.7416573867739413


Calculus

The essence of training is "adjusting parameters in the opposite direction of the gradient," so the optimization chapter in the paper cannot be separated from these symbols.

You don't need to calculate it now, just be able to understand each face.

Symbols Meaning Example / Description
Derivative: The rate of change of y with respect to x
Another way to write the derivative
Partial derivative: The rate of change of f when only x changes Used for multivariable functions
Gradient: A vector composed of all partial derivatives
Integration, the inverse operation of differentiation
Limit: The value as x approaches a

The most important formula in deep learning only uses the two lines in the table above, the parameter update rule for gradient descent is:

Deconstructing symbol by symbol: $\theta$ is a parameter, $\leftarrow$ means "update the left side with the value on the right", $\alpha$ is the learning rate, and $\nabla J(\theta)$ is the gradient of the loss function J with respect to the parameter $\theta$.

One-sentence translation:New parameter = Old parameter - learning rate × gradient, which means taking a small step in the direction that causes the loss to decrease the fastest.

Read as nabla or "gradient operator," it is not a number, but an operation instruction to "take the partial derivative with respect to all subsequent variables," much like a higher-order function in programming.


Optimization and other frequent symbols

This last section covers symbols that appear sporadically but are very important in the paper.

Symbol Meaning Example / Description
x that maximizes f returns x, not the maximum value itself
x that minimizes f training is optimization
the minimum value of f returns the value itself
softmax function
function composition
Defined as Left side is equal to the value on the right side
Proportional to
ReLU activation function
Big O notation: growth rate Ignore constants, only look at scale

What a classification model does when predicting is: take the class with the highest probability, argmax returns the class ID, not the probability value.

AndEasily confused:Answering "what is the maximum value",Answering "at what x the maximum value is obtained". Classification tasks care about the latter.


Learning suggestions

You don't need to memorize symbol tables; methods are more effective than memorization.

First, develop the habit of deconstructing symbols one by one: when you get a formula, first ask whether each symbol is an operator, a variable, or a function, and then ask what it represents in the current context; once broken down, it is often no longer mysterious.

Second, prioritize thoroughly understanding three things: summation, exponents and logarithms, and the integral sign. These are prerequisites for understanding linear algebra and calculus formulas, and this article has dedicated subsections for each.

Third, if you encounter an unfamiliar symbol, directly search for "symbol name + mathematical meaning"; this is faster than struggling with textbooks.

Symbols are maps, not terrain. True understanding comes from working through concrete examples; every Python instance in the text is worth running yourself.