What is an Equation?

Jitesh Khurkhuriya
Data Science learning Universe
5 min readDec 20, 2019

Welcome to the first post of the series on Mathematics for Machine Learning and Data Science.

In this post, we are going to discuss,

  1. What is Algebra and Algebraic equation?
  2. Distributive properties of an equation
  3. What is a Variable and Linear Equation?

These concepts are going to form some solid foundation for some of the advance mathematical concepts that we will see in the later part of this series. Some of these concepts may sound very simple and easy and you may wonder, why are we going through it. Bu refreshing these will help you getting the more advanced concepts very quickly.

What is algebra and equation?

It simply consists of two things, variables and constants, which are grouped together based on an equation. Equation is simply there to balance these two things.

So what we have on the left side of the “equal to” sign must balance with the right hand side.

A typical equation may look something like this. So we have,

3X + 4 = 10

Our aim here is to solve this equation to find out the value of X.

So by the basic rule of arithmetic, if we perform the same operation on both the sides, the equation remains balanced. So we subtract 4 from both sides and that cancels out 4 and we get the new equation as 3x = 6.

When we divide both the sides by 3, we have solved this for X, as we get the value of “X” as 2.

Let’s try to validate this by imputing the value of X as 2.

So we have 3 multiplied by 2 plus 4 which is equal to 6 plus 4. We have 10 equals to 10.

Distributive Property

Another important concept for an equation is the distributive property. Simply speaking, if we multiply an equation by a constant or variable, all the terms of that equation get multiplied by that constant or variable.

So in this equation, the X+2 gets multiplied by 3

and we have a new equation that is

The reverse is also true that we can take the 3 out of this equation and place it outside the bracket.

What is a Variable and Equation of a Line?

Though this is very fundamental concept, it forms the basis for many Machine Learning concepts such as Linear Regression.

In simple terms, variable is something that can take multiple values at different times.

So for example, we have kids studying in different classes and most of the time have seen that there is an entry level age for the first standard.

Let’s say it is 6 years. So students with 6 years are admitted in the first standard or class or grade. You may have different terms depending upon the country you are living in. So while the student is still studying in a particular grade, we can say that 5 plus the grade will be the age of the student or

or we can say that

This is nothing but the Linear Equation and the X and Y are the variables such that the value of Y will change with X. Now, if we impute different values of X, we will get this type of a matrix.

Here when X is 1, which means the student is in the first grade, his age or Y will be 6.

Let’s see how it will look when we plot it on a graph.

When we connect these dots, what we get is the line or the linear equation of a line that passes through these points. We can extend this line depending upon the type of equation and if it is feasible to do so. In this case, we can never have a negative age or grade.

However, for understanding purpose I am simply going to extend this line for now.

The point at which it crosses the y axis, the value of x is zero. This value of Y is called as Y-intercept whereas the one where Y is zero and it crosses the X axis, is called X intercept.

We have just built a very basic and simple prediction model for predicting the age of the student provided we know the grade.

Slope of Line

Let’s now try to understand another concept called Slope of the line. The slope of the line can be defined as change in Y for the corresponding change in X or change in Y divided by the change in X.

So the Slope of our line between the points in the figure below, can be calculated as 1.

Slope of the line and Rate of Change form the basis for the concepts of Derivatives which in turn is the basis for Optimization of Algorithms in Neural Nets as well as other Machine Learning Algorithms.

Summary

That sums up the basics of algebra, we need as a foundation. So far we have covered,

  1. What is Algebra and Algebraic equation?
  2. Distributive properties of an equation
  3. What is a Variable and Linear Equation along with the slope and intercept of a line?

We are going to go through more in depth concepts of some of the other mathematical concepts in the next part of the series.

This article is part of my course, Complete Data Science and Machine Learning using Python where we not only go through all such mathematical concepts but also implement the Machine Learning Algorithms in depth.

Thanks for reading….

--

--

Jitesh Khurkhuriya
Data Science learning Universe

Seasoned leader in Analytics and Digital Transformation. Writer and Instructor of Data Science and Machine Learning on Udemy.