## Variables and Graphs

### Going beyond tabular data

#### math_player

In the post on linearity and proportionality, we saw how CAD and MXN are quantitatively related to each other by enumerating some values of CAD and the corresponding values for MXN in a table (reproduced below).

10 150
20 300
40 600
5 75
2.5 37.5

But what if you wanted to know how much MXN corresponds to a certain value of CAD that’s not in the table, say 100 CAD? Obviously a table of finite length cannot show all possible pairs of CAD-MXN values (as there are infinitely many of them)! So then, is there a way of expressing the relationship between two quantities that’s more concise than tabulating only some of their values?

Indeed there is – as is to be expected since Math specializes in conciseness! To accomplish such a powerful compression of information, Math uses the concept of “variables”. The way this works is actually quite straightforward.

We start by designating the two quantities of interest, viz., MXN and CAD, as variables. Conventionally, variables are represented as letters1 in Math. In our case, let’s represent the amount of MXN by the letter $M$, and the amount of CAD by the letter $C$. Since the exchange rate between MXN and CAD in the post was taken to be 15 MXN to 1 CAD, the relationship between the two variables $M$ and $C$ is given by the formula:

$$M = 15 \times C$$

This formula (or more technically, “equation”) simply states that the amount of MXN $M$ you’d get in exchange for a given amount of CAD $C$ is equal to 15 multiplied by $C$ – which is essentially the same thing as saying that the exchange rate is 15 MXN to 1 CAD. Using this formula, it’s straightforward to compute how much MXN corresponds to any given amount of CAD, and vice versa. In other words, this formula contains all the information in the table we saw above, as well as so much more2 that we can dispense off the table completely!

So, as before, if you wanted to know how much does 100 CAD correspond to in MXN, you simply substitute the value 100 for $C$ in the above equation on the right-hand side (RHS), and you get the value of $M$ as $15 \times 100 = 1500$, i.e., 100 CAD corresponds to 1500 MXN.

Conversely, if you wanted to know how much, say, 4500 MXN corresponded to in CAD, you’d substitute the value 4500 for $M$ on the left-hand side (LHS) of the above equation, and try to find the value of $C$ that would satisfy the above equation. In this case, it’s easy to verify that the value3 300 for $C$ would satisfy our equation, since $4500 = 15 \times 300$. So 4500 MXN corresponds to 300 CAD.

But what if you’re more of a visual learner and prefer to understand the relationship between variables in a visual format? Don’t worry – Math has tools for satisfying your preferences too, viz., graphs!

Let’s say you want to graph the relationship between the two quantities MXN and CAD. Since there are only 2 quantities involved, we’ll employ a two-dimensional or 2-D graph. A 2-D graph uses two lines (technically called “axes”) – one horizontal, called the “X-axis”, and one vertical, called the “Y-axis” – one for each of the two quantities to be graphed. The intersection of the X and Y axes is called the “origin” O as shown in the figure below.

Next, you choose which axis represents which variable. Choosing an axis for a variable essentially means establishing a correspondence between each point on the axis and an amount of the variable that’s represented by that axis. So, if we choose to use the X-axis for CAD, and Y-axis for MXN, on the X-axis, the point O represents 0 CAD, and similarly on the Y-axis, the point O represents 0 MXN.4

Next on each axis, you choose a “scale5, which means choosing how much quantity of a variable is represented by a given length, say 1 cm, on the corresponding axis. For example, on the X-axis (which represents CAD), we may choose 1 cm to represent 5 CAD, and on the Y-axis (which represents MXN) we may choose 1 cm to represent 100 MXN. This implies that the point6 on the X-axis at a distance of 1 cm from the origin O represents 5 CAD; the point that’s 2 cm from O on the X-axis represents 10 CAD, and so on. Similarly on the Y-axis, the point7 at a distance of 1 cm from the origin O represents 100 MXN; the point that’s 2 cm from O on the Y-axis represents 200 MXN, and so on.

With this setup, you can represent each pair of CAD-MXN values from the table as a single point on the graph. To understand how this works, consider the example of one pair CAD-MXN values from the table, say 20 CAD - 300 MXN. This pair of values corresponds on the graph to the point of intersection of the vertical line passing through the mark “20” on the X-axis (which represents 20 CAD) and the horizontal line passing through the mark “300” on the Y-axis (which represents 300 MXN). Similarly, the pair of values 40 CAD - 600 MXN corresponds to the point of intersection of the vertical line passing through the “40” mark on the X-axis, and the horizontal line passing through the mark “600” on the Y-axis. Going through each pair of values in the above table, and marking each corresponding point by a mark, say “*”, on the 2-D graph produces the graph of MXN vs CAD shown below.

In this way, the information contained in the table above can be visualized on a graph.

If you join all the marked points on the graph above, you’ll see that you get a straight line, i.e., all the marked points lie on a straight line. This fact explains why the relationship between CAD and MXN is called “linear”. Mathematically speaking, the graph of two quantities that are linearly related to each other is a straight line.

In this way, a graph can act as visual tool to determine the relationship between two quantities.

Furthermore, it’s easy to read off the value of one variable corresponding to any value of the other variable from the graph. For example, if you wanted to know how much does 30 CAD correspond to in MXN, you simply draw a vertical line from the mark “30” on the X-axis (which represents 30 CAD), find its intersection with the straight line denoting the relationship between MXN-CAD, and then draw a horizontal line from that point of intersection to the Y-axis – the value you get on the Y-axis (which in this case is 450) is your answer, i.e., 30 CAD corresponds to 450 MXN.

Conversely, to get the value of CAD corresponding to a given value of MXN, you simply reverse the above procedure: draw a horizontal line from the point on the Y-axis that represents the given value of MXN, find its intersection with the MXN-CAD graph, then draw a vertical line from that point of intersection to the X-axis – the value you get on the X-axis is your answer.

Thus, a graph can be used interchangeably with a formula to find the value of one variable for a given value of another variable.

1. not necessarily from the English alphabet – it’s quite common to use Greek letters such as $\alpha$, $\beta$, etc. too ↩︎

2. viz., information about all possible pairs of CAD-MXN values (implicitly) ↩︎

3. Furthermore, you can easily convince yourself that this is the only value that would satisfy the equation. ↩︎

4. Conventionally, the origin O represents an amount of 0 of the variable that is graphed. ↩︎

5. N.B. The scale on each axis can be different. ↩︎

6. conventionally, to the right of the origin ↩︎

7. conventionally, above the origin ↩︎

Built with Hugo
Theme Stack designed by Jimmy