Real-Life Applications of Mathematics in Tech

When I got admitted to study Mathematics at my university, I got a lot of questions from people and I still get these questions today, one of them is "What has mathematics got to do with Software Engineering ?". At that time I was naive and I still thought that mathematics was just about numbers, so my reply was always "Mathematics is just everywhere, you can't live without mathematics, it's simply the bedrock of science." I am sure nobody agrees with that idea, people need to see and experience the real-life application of mathematics in Tech.


During the past few years of my academic pursuits, I have been afforded the opportunity to delve extensively into the study of Mathematics, but we still weren't taught about the real-life applications of all the DY/DX we learned, we just knew they existed and had no clue how to use them. Hence this article.

Applications of Mathematics in Software Engineering

Tech is a broad space and I am not sure one article will cover the problem statement so we will focus on Software Engineering, because why not?

Mathematics has been a fundamental tool for advancing technology and innovation over the years. From cryptography to machine learning, computer graphics to robotics, the use of mathematics has become an essential part of modern technological developments. In this article, we will explore some of the fascinating ways mathematics is applied in software engineering and highlight some specific examples of mathematical equations and concepts used in each application. Join us on this journey to discover how mathematics has revolutionized the tech industry.


Let's look at Cryptography and how it relates to a particular concept in Mathematics called Number Theory.

Cryptography

In layman's terms, this is the practice of securing communication from unauthorized access. It involves techniques for converting plain text into secret code (encryption) that can only be deciphered with the right key. Cryptography is used to protect sensitive data in various applications, including online transactions, email, and messaging services. This is basically encryption and decryption.

Number Theory as you would guess is the branch of mathematics that deals with the properties and relationships of numbers. This is a very broad field in Mathematics but we'll pick a sub-sub-topic called the Chinese-Remainder-Theorem.

I first heard of the C.R.T in February 2023 from my Abstract Algebra Lecturer Dr Obi Martins. The C.R.T. is a mathematical concept that provides a solution for simultaneous congruences of integers. It states that if we have a set of pairwise relatively prime moduli, then there exists a unique solution up to the product of the moduli.

The RSA(Rivest-Shamir-Adleman) algorithm is a popular encryption algorithm used in cryptography that relies on the difficulty of factoring large numbers. The algorithm involves the use of a public key and a private key to encrypt and decrypt messages. The Chinese Remainder Theorem is used in the RSA algorithm to speed up the decryption process by reducing the number of calculations needed.

To use the Chinese Remainder Theorem with the RSA algorithm, the ciphertext is first calculated using the public key. Then, the ciphertext is decrypted using the private key using a set of modular equations that are derived from the prime factors of the modulus.

Here's an example of how to implement the RSA algorithm with the Chinese Remainder Theorem in Python:

Chinese Theorem Implementation in RSA Algorithm

In the above code, generate_primes() generates two random prime numbers, generate_keys() generates the public and private keys, encrypt() encrypts the message using the public key.

Machine Learning

I won't elaborate much on this because machine learning is fundamentally based on principles from mathematics and statistics. In machine learning you have to do a lot of data analysis, data visualization (bar charts, histograms, pie charts, graphs, etc), and data optimization which involves a popular section of Mathematics called operation research where you learn about Game Theory, Simplex Method, BIG-M method, linear regression using linear algebra.


There are other countless applications of mathematics not mentioned here like
Robotics:

  • Inverse Kinematics: Inverse kinematics is a mathematical technique used to calculate the joint angles required to position a robot's end effector in a desired location. It involves solving complex equations that describe the geometry of the robot's joints.

  • Control Theory: Control theory is a branch of mathematics used to design controllers that regulate the behavior of a system. It involves using feedback to adjust the input to the system based on its output.


Computer Graphics:

  • 3D Transformations: 3D transformations are mathematical operations used to manipulate the position, orientation, and size of objects in three-dimensional space. They involve matrix multiplication and vector operations.

  • Ray Tracing: Ray tracing is a rendering technique used to create realistic images by simulating the behavior of light. It involves solving complex differential equations to trace the path of light rays.


We have seen the real-life application of Mathematics in Software Engineering, this does not imply you need a degree in mathematics to be a good Engineer, these concepts are easy to pick up and should not scare you away.