1.2 Dependence

Schematics are great for illustrating relationships between variables! We'll write
\[ \begin{align} x &: \Number, & y &: \Number, & z &: \Number \end{align} \]
to say that \( x \), \( y \), and \( z \) are variables that hold numbers. If a schematic has the variable \( z \) on its output wire and the variables \( x \) and \( y \) on its input wires, then we'll write
\[ \begin{align} z &\depends (x, y) \end{align} \]
to say that \( z \) depends on \( x \) and \( y \). Similarly, we'll write
\[ \begin{align} z &\depends x \end{align} \]
to say that \( z \) depends only on \( x \). While we are free to use any variable name for any purpose, we'll usually reserve \( z \) for output and \( x \) and \( y \) for input.
Example.
Let's take a look at the following schematic. We've placed variables on some of the wires.
Overall we have an output variable, \( z \), and two input variables, \( x \) and \( y \).
\[ \begin{align} z &\depends (x, y) \end{align} \]
By thinking of our input variables as values, we can push them from right to left through the schematic.
When two expressions \( z \) and \( x^2 + x y \) share the same wire, we expect them to be equal! So we've learned not just that \( z \) depends on \( x \) and \( y \), but how.
\[ \begin{align} z &= x^2 + x y \end{align} \]
If we know how a variable depends on other variables, we can draw its schematic. We'll start on the left with the output wire and work to the right.
Example.
Suppose the variables \( z : \Number \) and \( x : \Number \) are related as follows.
\[ \begin{align} z &\depends x \\ z &= x^2 - 3 x \end{align} \]
That is, \( z \) depends on \( x \), and the equation tells us how. Let's draw this relationship as a schematic. We begin with our output wire \( z \).
Overall, our expression, \( x^2 - 3 x \), is made by subtracting. We draw the subtraction component and write the expressions \( x^2 \) and \( 3 x \) on its input wires.
Let's further decompose each of these! The expression \( x^2 \) is made by squaring, and the expression \( 3 x \) is made by multiplying.
We now have two wires labeled with the variable \( x \). Let's join these together so that that this shared input comes from a single wire. And let's cap off the constant \( 3 \) with a constant component.
We've found our schematic!
See if you can draw schematics for each of the following.
\[ \begin{align} z &= x^3 - 1 \\ z &= \sqrt[2]{x + y} \\ z &= 5 \mult \bigl(x^2 + x\bigr) \\ z &= \frac{3 y}{x - y} \end{align} \]
It's good to get practice drawing schematics from left to right, as we did in the previous example. At each step decomposing, try to identify what left-most component was used to build the expression.