Mathematics Importance in AI/ML

Mathematics Importance in AI/ML

Importance of math in AI/ML, skills required to learn mathematics in the field and connection between probability, statistics, linear algebra and calculus.

Series: Attention because it's all you need. (14 articles)

  1. …
  2. 3
    Mathematics Importance in AI/ML This article
Machine Learning Engineer | Frontend Developer | Deep Learning & Generative AI | RAG, MLOps & AWS

Why Mathematics in AI/ML Matters

When starting the AI/ML journey, the following question arises: How deep should my understanding of mathematics be? Should I learn all mathematics thoroughly or just know how to use different libraries/models and build AI applications? The truth is somewhere in between.

Can We Build AI/ML Applications Without Knowing Mathematics?

From the technical point of view, yes. We can use scikit-learn, PyTorch, TensorFlow, and modern API-based AI services without having any understanding of the mathematics behind all these models. However, it's a big difference between using some kind of a model and understanding how and why it works. When you begin to ask yourself:
  • Why does gradient descent work?
  • Why does a model overfit?
  • What does probability mean in terms of predictions?
  • How do we update weights of a neural network?
  • Why does attention mechanism work?
  • What does an embedding actually represent?
the role of mathematics in the AI/ML process becomes undeniable.

Why Should We Study Mathematics in AI/ML?

The essence of the Artificial Intelligence/Machine Learning is to operate with data, probabilities, optimization, and mathematical representations. A model does not understand the data the way we do. It manipulates numbers through mathematical operations and learning patterns by adjusting parameters based on certain mathematical objectives. This doesn't mean that each AI task requires solving any equation by hand. It means that mathematics help us to understand what the algorithms do.

What Mathematics Do We Need?

There is no single branch of mathematics covering everything we need.

Statistic: is a tool for understanding and analyzing data.

Main topics: Mean, median, variance, standard deviation, distributions, histograms, correlation, covariance, sampling, confidence intervals, hypothesis testing, z-scores, and others. Statistics become essential when dealing with real-world data and evaluating models.

Probability: is a tool for reasoning about uncertainties.

Topics include: Conditional probability, Bayes' theorem, random variables, probability distributions, expectation, and likelihood are used in Machine Learning.

Linear Algebra: Machine Learning operates with the vector/matrix representation of data.

So such concepts as: Vectors, matrices, matrix multiplication, dot products, transformations, eigenvalues, eigenvectors become important, especially in Deep Learning and Transformers.

Calculus: becomes important when learning about optimizations and neural networks.

Main topics: Derivatives, partial derivatives, gradients, chain rule, optimization explain how models learn and how parameters are adjusted during the training process.

Is Everything in AI/ML Just About Mathematics?

Definitely no. AI/ML is a combination of mathematics, programming, data, experiments, and engineering. While mathematics explain the theoretical background, programming allows us to implement it, and experiments allow to check if it actually works. Even scientific research is not just doing calculations. It includes designing methodologies, testing hypotheses, analyzing results, and interpreting their meanings.

How Am I Going to Learn All That Mathematics?

I don't plan to stop everything and learn mathematics for several months before diving into AI/ML. Instead, I'll develop the mathematical knowledge base alongside AI/ML studies. Main directions will be:**** Start with Linear Algebra then Calculus then Probability & Statistics
With additional focus on probability and statistics, since they are always useful in order to understand data, uncertainty, distributions, and model performance. The goal is not to memorize any formulae. The goal is to understand where mathematics is used in AI/ML and why it is necessary.**** In other words, when I see some algorithm or read some scientific paper, I will be able to understand mathematics behind the ideas instead of considering them just as a black box.

Series: Attention because it's all you need. (14 articles)

  1. …
  2. 3
    Mathematics Importance in AI/ML This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article