← | Table of contents | → |
Substitution is a critical mathematical skill to master. The idea
is simple: replace one thing by another.
You are given an expression, E, and need to replace all occurrences of some variable, such as x, by a given expression A. Put parentheses around A where it is substituted to avoid confusion. Here are some examples.
Replacing all occurrences of x in (x(x+y)) by 4 yields ((4)((4)+y). You can remove parentheses where they are no longer required if you like, giving 4(4+y).
Replacing all occurrences of y in (yz) by w+2 yields ((w+2)z). Notice that the parentheses around w+2 are really necessary here, since w+2z would not be the same.
Replacing every occurrence of z by 20 in expression z + 2 yields (20) + 2. Notice that we are only doing a replacement. Realizing that 20 + 2 = 22 is a separate step that is not to be confused with substitution.
Sometimes a substitution involves the same variable that is being replaced. For example, replacing all occurrences of x by x+1 in expression (x+4)(xy) yields ((x+1)+4)((x+1)y).
You can perform substitutions in equations. For example, replacing every y by wz in equation y+2 = 20y yields equation (wz)+2 = 20(wz).
You can perform substitutions even when you do not know what things mean. For example, substituting n(n+1) for each occurrence of x in expression jump(x) ⊕ x yields jump((n(n+1)) ⊕ (n(n+1)).
Suppose that A and B are two expressions, where you know that A = B. Then you can replace a subexpression A by B in some other expression. Here are some examples of those substitutions.
Replacing n+1 by m2 in expression n(n+1)/2 yields n(m2)/2. The parentheses can be omitted when removing them does not affect the meaning, which gives nm2/2. Notice that we only replaced one subexpression, n+1.
If you know that n+1 = m2, then you also know that n(n+1)/2 = nm2/2.
You can only replace subexpressions. You can identify a subexpression by putting parentheses around it. If the parentheses do not change the meaning of the expression, then you have a subexpression.
For example, suppose that you want to replace x+y by 2 in expression x+yz. Does that give 2z? No!. Putting parentheses around x+y gives (x+y)z, which is not the same thing as x+yz because multiplication has higher precedence than addition.
Replacing x ⊕ y by z ⊗ (w+1) in equation jump(x ⊕ y) = 0 yields equation jump(z ⊗ (w+1)) = 0.