Basic arithmetic/calculus.
In the series: Note 2.
Subject: Linear equations

Date : 10 Februari, 2016
Version: 0.3
By: Albert van der Sel
Doc. Number: Note 2.
For who: for absolute beginners.
Remark: Please refresh the page to see any updates.
Status: Ready.


Maybe you need to learn basic "mathematics" rather quickly.
So really..., my emphasis is on "rather quickly".

So, I am really not sure of it, but I hope that this note can be of use.
Ofcourse, I hope you like my "style" and try the note anyway.



Contents:

1. Positions in a Coordinate Sytem for the XY "plane".
2. Linear equations "y = ax + b" (they represent "lines" in a Coordinate system).
3. The equivalent "ax + by = c" notation.
4. Solving linear equations (finding the intersection of 2 lines).
5. The "slope" of a line.
6. Finding the equation of a line, if you have two points.
7. An important property of the slopes of 2 perpendicular lines: a1 x a2 = -1

It might be that chapters 5 and 6, are percieved as a "bit hard".
No problem. Then just skip those. But I hope that you try them anyway.


1. Positions in a Coordinate Sytem for the "plane".

In a flat "plane", we often should be able to pinpoint, or exactly describe, positions.

Long time ago, mathematicians deviced a rather nifty method to accomplish that purpose.
They designed a "grid", with a well-defined point of reference. This special point, is often called
"the Origin". Next, two perpendicular "axes" are drawn, which intersect exactly at the Origin.
The horizontal axis, is called the "x-axis". The vertical axis, is called the "y-axis".

So how do we pinpoint "points" in that Coordinate system?
Take a look at figure 1.


Figure 1. Coordinate system (in the plane).



From the Origin (O), if you take 3 steps to the right, you are at x=3.
Or more precise, if you take 3 steps to the right, you are at x=3 and y=0, since you never moved "up" or "down"
along the "y direction" at all.

In the next example, we will move in both the x- and y directions.
From the Origin (O), if you take 3 steps to the right, you are again at x=3.
If you now, from that position (x=3), take two steps up in along the y-direction, then you
arrive at x=3 and y=2. The way how often mathematicians write that down is: we are at point (3,2).
Do you see the point (3,2) in figure 1 above?

We do not only have positive numbers like 1, 3, 12, 1000 etc.., but negative numbers as well.
Those are numbers like, for example, -1, -3, -12, -1000 etc..
If you are not "comfortable" with negative numbers, then in this link (section 3),
I try to explain it a bit. However, you do not need to go to that link. You can also see it this way:

In the Coordinate system, if we take steps to the right on the x-axis, we go to points like x=1, x=7, etc..
However, if taking steps to the left, thus in the opposite direction, we have ("sort of") no other choice
than using different numbers. You know, the positive ones are already taken.
But it really makes sense to denote "moving to the left" as saying that we go to x=- 1, x=- 7 etc...

It makes it completely "symmetrical". For example, from the Origin, if you take 5 steps to the right,
you go to x=5. But, if you, from the Origin, take 5 steps to the left, you end up in x= - 5.
In such a way, 5 steps to the right, or 5 steps to the left (from "O"), have the same absolute distance.
In fact, only this way we have a truly usable Coordinate system.

As a last example, note the point (-3, -3) in figure 1. It means: x= - 3 and y = - 3.
If you want to "pinpoint" the position, you may say: it's the point where x= - 3 and y = - 3.
But it's much easier to pinpoint it by using the notation (-3,-3).
In words: (-3,-3) means: from the Origin, I take 3 steps to the left along the x-axis, and
I take 3 steps down along the y-axis.

2. Linear equations y=ax+b: they represent "lines" in a Coordinate system.

Next we are going to study "linear equations", which are equations of the form "𝒴=a𝒳 +b".

I will explain the equation in a minute. But first a few words on how we write it down.

About the "format" of such equation:

If you look at such equation "y=ax+b", then you must know that here "x" plays the role as the variable
along the x-axis, and not the multiplication symbol. That symbol is usually simply left out.

So, y=ax+b, where a and b are some constants (like "2" and "3"). It expresses how "y" depends on "x", that is,
what the values of "y" are, when we vary "x". It turns out to be a straight line. We will explain that below.

Now about the meaning of such equation.

If you see such a formula for the very first time, I can understand that you think "What is that!???".

We already have seen the Coordinate system with the x- and y axes. You can define, or pinpoint, "points" in the plane,
by specifying the exact "x" and "y" for such a point, like for example the point (2,4).

Let's take a look at a specific example, like "y=2x".
And.. let's see what happens with the value of "y" if we fill in a couple of "x values". Here we go:

Table 1: calculate "y" for a number of x values.

value of x: value of y: (which is 2x)
x= -2, then y= -4 (because 2 x -2 = -4)
x= -1, then y= -2 (because 2 x -1 = -2)
x= 0, then y= 0 (because 2 x 0 = 0)
x= 1, then y= 2 (because 2 x 1 = 2)
x= 2, then y= 4 (because 2 x 2 = 4

Figure 2. The functions y=2x (red) and y=2x + 3 (blue)



In figure 2, we simply have plotted the points from Table 1, into the Coordinate system.
If we connect those dots, we simply get a line ! See the red line in figure 2.

We may conclude that if we put the equation "y=2x" into the Coordinate system (by calculating y values,
for a certain number of x values), we then find a line. A line is also often called "a linear equation".
So, an equation like "y = ax", where a is just some constant number, can be represented by a line.

You could perform a similar action for other equations like for example "y=5x" etc..

By the way: note that for drawing a line, you actually need only two points.
You may ofcourse calculate for a larger number of "x-values", what then the resulting "y-values"
will be, just like we did in Table 1. But actually, doing so for 2 points only, is enough.

So, we analyzed the equation "y=2x" and saw how we could plot points in the Coordinate system.
That example stands model for any sort of such equation "y=ax", where "a" is some number.

However, a general linear equation is this:

y=ax +b

So, what's the story with "b"?
Well, in figure 2 I have placed the example line "y= 2x +3".
Note that for all x on the x-axis,, that line is exactly "3" above "y= 2x"
So, it's always 3 above "y= 2x" with respect to the y values.

Does that make sense? Take a look again at both examples:

y= 2x
y =2x +3

Yes, the only difference is the '+3', which means that for all x on the x-axis, y is always '+3' larger
compared to the equation "y=2x".
In figure 2, notice the blue line. It's the line "y=2x +3".

Question: could you create a similar table like Table 1, but this time for "y=2x +3"?
By the way, the answer can be found in figure 2 as well. Note the column on the right side.

=> The Power of a linear equation:

Actually, the real power of having an equation, like for example "y=7x -5",
is that you immediately can calculate "y", for any x

For example, you do not need to draw a line first in a Coordinate system. Say x=30, then y=7x30 + 5 = 215.
And that holds for any "x". Just do the calculation, and you know the value of the corresponding "y".

=> A special case:

In general, we have the equation "y = ax +b", where "a" and "b" are some specific numbers.
For each different "a" and "b", we have a different line in the Coordinate system.

However, what happens if "ax=0"? Then we simply have "y=b".
This means that, for every x along the x-axis, y remains the same, namely "y=b".

So we could have the line "y=5", or "y=-7" etc.. These lines are parallel to the x-axis, since y remains constant.

Here are some examples:

Figure 3. Some examples of the equation "y=b" (thus y is constant).



=> Another example of y=ax +b:

This time, we will take a look at the line "y = -3x + 2".
Here, the number "a" is a negative number. Nothing changes fundamentally, however, if you are really
new in this business, you just need an example of such a case.

Let's draw the line, with the help of a table, similar to Table 1.
But..., you need to know a certain fact beforehand. Maybe you already know this, or not, in which case in cannot hurt.

Here is what I mean:

a positive number X a positive number = a positive number. For example 5 X 5 = 25
a positive number X a negative number = a negative number. For example 5 X -5 = -25 (note the "-" signs).
a negative number X a negative number = a positive number. For example -5 X -5 = 25.

So, for example 5 x 5 maybe seen as "Do 5 times, 5 steps to the right from the Origin",
which will put you at x=25.

For example, 5 x -5 maybe seen as "Do 5 times, 5 steps to the left from the Origin,
which will put you at x= -25.

For example, -5 x -5 maybe seen as -(5 x -5) = - (-25) = 25
which will put you at x= 25.

Indeed, a "negative number" times a "negative number" is positive.


Ok, it's time to draw the line:

Table 2: calculate "y" (y = -3x + 2) for a number of x values.

value of x: value of y: (which is -3x + 2)
x= -2, then y= 8 (because -3 x -2 + 2 = 6 + 2 = 8)
x= -1, then y= 5 (because -3 x -1 + 2 = 3 + 2 =5)
x= 0, then y= 2 (because -3 x 0 + 2 = 0 + 2 = 2)
x= 1, then y= -1 (because -3 x 1 + 2 = -3 + 2 = -1)
x= 2, then y= -4 (because -3 x 2 + 2 = -6 + 2 = -4


Since we have two or more points of this line, we can draw it now:

Figure 4. The line y = -3x + 2.



We have seen the functions of the form "y=ax+b". There is however a different
way to write them, but both ways are fully equivalent.

3. The equivalent "ax + by = c" notation.

We know about this equation:

y = ax + b

However, many mathematicians say that this is a linear formula, while the equivalent
mathematical relation should be notated as:

ax + by = c

I say: those ways to write it down, are completely equivalent, or in other words, they are the same.
Let's take a look at a few examples:

Example 1:

Suppose we have:

y = 2x + 3

Then how to rewrite that to the other format?
It's really easy. On both sides of the "=" symbol, we may add or subtract any number, or term,
and it makes not difference. As long as we do it at both sides.
You may even multiply all terms on both sides of the "=" symbol, with the same number.

So, if we add -2x to both sides, we have:

-2x + y = 2x + 3 -2x

And that will resolve to:

-2x + y = 3.

Yes, it looks different, but it's the same as "y=2x+3".

Example 2:

Suppose we have:

y = -4x + 3

Let's rewrite it to the other format.

On both sides, I may add +4x. So then the equation becomes:

4x + y = -4x + 3 + 4x

On the left, the "+4x" and "-4x" cancel out, so we have:

4x + y = 3

You can always rewrite such an equation to the older format "y = ax + b".

There are some advantages of the format "ax + by = c", compared to the traditional equation.
You will see them in later notes. One such advantage is that the "vector" perpendicular to
the to line represented by "ax + by = c", is the vector (a, b).
You will see that in later notes.

4. Solving linear equations.

Well, a linear equation like "y=ax +b", holds for all x's and y's, or in other words, it is a certain relation
between x and y in the entire Coordinate system.

Solving an equation can mean that you can calculate a specific "y" value for a specific "x".

For example:

What is the value of "y" if x=3 for the equation y=5x +2 ?

Answer: y= 5 x 3 + 2 = 15 + 2 = 17.

However, what is usually meant by solving, is finding "special points".

Any line (except the horizontal and vertical lines), will "intersect" with the x-axis and y-axis.
Finding those (x,y) points, can be of great use:

1. Intersection with the y-axis:

At such a specific point, thus where the line crosses the y-axis, then we know for sure that "x=0".
Take a look at the figures above.
From those examples, you can really see that at intersection with the y-axis, then x=0.

Thus for that specific point:

y= ax +b and with x=0, we have y= a x 0 + b = b

For example: the line y=2x + 3 crosses the y-axis at: x=0 and y=3, or the point (0,3).

2. Intersection with the x-axis:

If a line crosses the x-axis, then at that specific point, y=0.
Take a look at the figures above. At the x-axis, the height of y is zero, so y=0 at that point.
Thus:

y= ax +b and if y=0, then ax +b =0, thus x=- b/a

Note:

If we have: ax + b = 0
Then we may add "-b" to the left side- and right side of the "=" sign. Thus:

ax + b = 0 =>
ax + b -b = -b =>
ax = -b =>
x= -b/a

So, for example, suppose we have the line y=2x +4. Where does it intersect the x-axis? At that point, we know for sure that y=0. So:

2x + 4 = 0 =>
2x + 4 -4 = -4 =>
2x = -4 =>
x= -4/2 = -2

So, this line intersects the x-axis at x=-2, or at the point (-2,0).

3. Intersection of 2 lines at some point:

Two lines which are not parallel, will intersect at a certain point. Ofcourse, since the lines are straight,
there can only be one such point.
See figure 5 for an illustration.

Figure 5. Intersecting lines



One thing is for sure: where they intersect, at that one point, the lines share the same "x" and "y".

So, suppose we have:

y= -3x - 3
y= -x - 1

Since at that point y=y, we have:

-3x + 3 = -x - 1

Since an equation stays the same if on both sides of the "=", the same is added.
Let's add "x" to both sides:

-3x + 3 + x = -x -1 + x

thus:

-2x + 3 = -1

Add -3 to both sides:

thus:

-2x = -4

thus:

x = -4/-2

x = 2

So, at least the x-coordinate is known. It's x=2. Now you can use either of both equations to calculate
the y-coordinate. Let's use "y= -x - 1". Thus y = -2 - 1 = -3.
Thus we have found the point (2,-3), where both lines intersect.

5. The "slope" of a line.

You may have noticed, that some lines rise steeply, as "x" increases. Other lines, only
rise moderately, of even slowly as "x" increases. It just depends on the "slope" of the line.
The figure below, illustrate some lines with a different "slope".

Figure 6. A few lines with a different slope.



-Please take a look at the line y=3x+3.
Here you see that if you take one "x step" to the right, then "y climbs" 3 steps.
Maybe you can also note the small triangle near that line, illustrating the effect.

-Please take a look at the line y=½x-2.
Here you may notice, that you must take "two x steps" to the right, before "y climbs" only one step.

This illustrates the "direction coefficient", or "slope" of a line.
Notice that the "a" in the equation "y=ax+b", fully determines the slope of a line.

For example, in the two examples above, we had a line with "a=3", which shows a line
which rises rather steeply.
But in the other example, we had a line with "a=½:, which shows a line
which only rises slowly.

It's important to see that in the equation "y=ax+b", the "a" immediately shows you the slope
of that line. For example, "y=12x+3" rises very steeply, since "a=12".

Note, that if "a" is a positive number, then we have a rising line (if you move to the right on the x-axis).
Also note, that if "a" is a negative number, then we have a declining line (if you move to the right on the x-axis).

Indeed, you may for example take a look at the line "y = -2x + 2", en then you will see that
it declines if you move to the right on the x-axis, but it rises from the perspective if you move to the left
on the x-axis.

The "slope" of lines will be explored further, when we will study the socalled "derivative" of functions.

How to determine the slope (or direction coefficient) of a line:

You may always take one "x" step to the right, and then see how "y" changes, that is, how did "y" changed
in the number of steps, if you took one step of "x".

But it does not have to be one step of "x". You may also take for example 3 steps of "x", and see how
the number of "y steps" changed.

The ratio of the "y steps" with the "corresponding x steps", is namely constant, since a line has
a constant slope.

Example:

Suppose from a certain line y=ax+b, you found that with one step of "x" to the right, then "y" climbs 4 steps.
Then the slope is:

slope= 4
-
1
= 4

Note that you now also immediately have found the "a" of the equation "y=ax+b".
So, at least we now know that the equation is "y = 4x + b".

To make this a bit more general: take any increase of x as you like (denoted by Δx),
and determine the corresponding change in y (denoted by Δy), then:

slope= Δy
--
Δx

You may also say:

y = ax + b = slope * x + b = Δy
--   x
Δx
+ b

6. Finding the equation of a line, if you know two points.

Optional chapter.

From chapter 5, we know that you have found the "a" of the equation y = ax + b,
if you know the slope of that line. Then, all that's left to do, is finding "b".

So, suppose we have the points (2,1) and (6,2). What is the equation of the line
which goes through both points?

-Determine the slope, and thus "a":

From the coordinates of those 2 points, we see that If we move 4 steps the the right on the x-axis,
then y has climbed only one step.
Thus:

slope= 1
-
4

At this point, we know that the equation must be "y = ¼ x + b".


-Finding "b":

We only need to use one of those two points, (2,1) or (6,2), and substitute those x,y values
into the equation "y = ¼ x + b". Suppose we use (2,1). Then:

1 = ¼ * 2 + b

Thus:

1 = ½ + b

Thus:

b = ½

So, our equation is: y = ¼ x + ½

7. An important property of the slopes of 2 perpendicular lines: a1 x a2 = -1

When two lines are perpendicular, an important property holds for their slopes.
The proposition is, that if you would have two perpendicular lines:

f(x) = a1x + b  (thus it's slope is: a1)
g(x) = a2x + c  (thus it's slope is: a2)

then:

a1 x a2 = -1

Mathematically, it can be proven ofcourse. I will only make it plausible by showing
two randomly choosen lines, which are perpendicular. You ofcourse, can take any
other two perpendicular lines, if you want.
See the figure below, which illustrates two random perpendicular lines.

Figure 7. For two perpendicular lines, then "slope1 x slope2 = -1".



Here we have the lines:

f(x)=3/2x + 6.5
g(x)=-2/3x

It's easy to see that in this case:

a1 x a2 = 3/2 x -2/3 = -1

But this generally is true.

Excercise:

Suppose we have f(x)=3x -2

Determine the line g(x) which is perpendicular to f(x), and also passes through the point (-3,2).

Answer:

We immediately know the slope of g(x). Since:

3 x (slope of g(x)) = -1

It follows that the slope of g(x) = -1/3.

Thus: the linear formula of g(x) is: g(x) = -1/3x + b

Now, we only need to determine "b". That's easy, since g(x) must pass through (-3,2).

Thus:

2 = -1/3 x -3 + b => b=1.

Thus the answer is: g(x) = -1/3x + 1



That's it. Hope you liked it.
The next note as about quadratic functions and higher order polynomials.