50 Mathematical Concepts For Better Programming (Part 1)
Check out my books below:
1. Sets
Sets are collections of objects.
Georg Cantor, a German mathematician initiated the development of set theory.
A set is mathematically represented by items inside curly braces ({}).
For example:
- a set of natural numbers (N):
{1, 2, 3, … ∞} - a set of whole numbers :
{0,1, 2, 3, … ∞} - a set of integers (Z) :
{-∞,… 0,1, 2, 3, … ∞} - a set of rational numbers: numbers that can be represented as a ratio of two integers. For example :
{…, 5/2, 4/3, 0.76,...} - a set of irrational numbers: numbers that cannot be expressed as a ratio of two integers. For example :
{…, √2, √5, π, e, …} - a set of real numbers (R): consisting of a set of rational and irrational numbers
- a set of imaginary/ complex numbers ( C ): numbers represented as
a+biwhere a & b are real and i =√-1 - a set of all numbers: consisting of a set of real numbers and complex numbers
Notations
- Ø is a Null set i.e. A set that does not have any elements.
- μ is the Universal Set i.e. the set of all the elements of all the sets which are being considered for set operations
- A’ is the complement of a Set: A set that includes all the elements that are not part of the universal set i.e. (A’ = μ — A)
- x ∈ A represents that x is a member of A. For example, a person (x) in a set of the population of France (A).
- A ⊂ B represents that A is a subset of B. For example, the set of the population of France (A) is a subset of the set of the population of Europe (B).
- ∪ represents the Union of two sets i.e. the combination of all the elements of two sets into a single set
- ∩ represents the Intersection of two sets i.e. combining the common elements of the two sets into a new set
2. Venn Diagrams
These are a scheme of representing sets and their operations diagrammatically.
Intersection of Two Sets

Union of Two Sets

3. Prime Numbers & Riemann Hypothesis
A Prime Number is any natural number greater than 1, that can only be divided exactly by itself or 1.
A set of Prime numbers can be represented as {2,3,5,7,11,13,17,...}.
Riemann Hypothesis
It is a hypothesis that suggests that the distribution of prime numbers can be predicted and the frequency of prime numbers is very closely related to the behavior of the Reimann Zeta function.

To be precise, this conjecture tells that the Riemann zeta function has its zeros only at:
- the negative even integers (trivial zeros) and
- complex numbers with real part 1/2 (non-trivial zeros)
This is one of the unsolved Millennium problems in mathematics and the first person to provide acceptable proof will be given a $1 million prize by the Clay Mathematics Institute.
4. Probability
It is a mathematical branch that deals with the likelihood of an event occurrence.
Mathematically represented by P, the probability of an event X occurring is P(X).
P (X) = Number of events where X occurs / Total number of possible outcomes
For example, the probability of getting heads in a coin toss is 1/2 or 50%.
Rules of Probability
- The probability of an event can only be between 0 and 1.
- If two events are independent of each other’s occurrence, then the probability of both happening is given by multiplying their individual probabilities.
P (X and Y) = P (X) * P (Y)
- If two events are mutually exclusive, the probability of either one occurring is given by adding their individual probabilities.
P (X or Y) = P (X) + P (Y)
5. Calculus
It is a mathematical branch that is concerned with continuously changing quantities.
Its two major branches deal with:
- the rate of change/ gradient of a quantity (differential calculus)
- summation of infinitely many small quantities to calculate the whole (integral calculus)
Differentiation
It is used to calculate the gradient/ slope/ tangent of a mathematical curve.
It can also be used to find the smallest (minima) and largest value (maxima) of a function.
For a curve with an equation of y= x^n, the gradient of y with respect to x (dy/dx) is given by n * x^(n-1) .
Rules of Differentiation
d(n)/dx = 0d(x)/dx = 1d(x^n)/dx = n * x^(n-1)d(e^x)/dx = e^xd(ln x)/dx = 1/xd(n^x)/dx = n^x * ln(x)d(sin x)/dx = cos xd(cos x)/dx = — sin x
Integration
It is the inverse of differentiation.
It is commonly used for calculating areas and volumes of shapes.
For an equation y = x^n , the integral of y is given by:
∫y dx = ∫ (x^n) dx = (1/n+1) * (x^n+1) + C
where C is a numerical constant.
Check out the next parts in this series below:
That’s everything for this article. Thanks for reading!





