# Sides of Equations

Applying same operations on both sides of =

# Manual Operations on the Sides

<p class="callout info"><span style="white-space: pre-wrap;">
<b>What</b>: Use ff to duplicate the manual ways handling equations as taught in school teachings.  
<b>Why</b>: To make sure you understand how to manipulate sides of an equation on your own. 
<b>How</b>: Simply try to duplicate what the teacher does to solve an equation by working the sides.
<b>Time To Complete</b>: 3 hours. </span></p>

<!--
comment
-->
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode.en" target="_blank">
<img src="https://wiki.compclassnotes.com/uploads/images/gallery/2026-05/scaled-1680-/cc.png" alt="Alt Text" width="20%" height="20%">

</a>

<span style="color: rgb(0, 0, 0);white-space: pre-wrap;">Manully set the lhs and rhs variables to some expressions of choice and then commence, step by step, applying the same arithmetic operations to both sides.</span>

<span style="color: rgb(0, 0, 0);white-space: pre-wrap;">In this example, the equation</span>

<span style="color: rgb(0, 0, 0);white-space: pre-wrap;">x-3 = 17*<b>y</b> +9 </span>

<span style="color: rgb(0, 0, 0);white-space: pre-wrap;">is being solved for <b>y</b> namely the equation is transformed to a new equation with <b>y</b> alone on either side as the solution.
</span>

```
lhs = x - 3;
rhs = 17 * y + 9;

lhs = lhs - 9;
rhs = rhs - 9;

lhs = lhs / 17;
rhs = rhs / 17;

show lhs also rhs;

save as sides;
```

**Output**

   <style>
        .box {
            width: 200px;
            height: 70px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box">
  "lhs" → (-12 + x)/17
  <br>
"rhs" → y
</div>

<hr style="border: 0; height: 1px; background-color: #ccc;">

<p style= "color: orange;font-size: 10px;"> <b>© 2012-Present CCN Studios</b> </p>

<p style= "color: orange;font-size: 10px">
<b>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 </b>
</p>

# Right hand side vs. Left hand side

<p class="callout info"><span style="white-space: pre-wrap;"><b>What</b>: Different sides to an operator e.g. == 
<b>Why</b>: Proper treatment of the sides of an operator e.g. == results in much functionality
<b>Time To Complete</b>: 3 hours </span></p>

<!--
comment
-->
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode.en" target="_blank">
<img src="https://wiki.compclassnotes.com/uploads/images/gallery/2026-05/scaled-1680-/cc.png" alt="Alt Text" width="20%" height="20%">

</a>

#### <span style="background-color: rgb(251, 238, 184); white-space: pre-wrap;">.left </span><span style="white-space: pre-wrap;">and </span><span style="background-color: rgb(251, 238, 184);">.right</span>

<span style="color: rgb(0, 0, 0); white-space: pre-wrap;">In Free Form Programming Language (ff) the dot operator, namely the dot on your keyboard, allows for accessing **parts** of an expression!</span>

<span style="color: rgb(0, 0, 0);white-space: pre-wrap;">For a given equation e.g. eq, in the ff program below, the lhs or x^2-1+y can be accessed by the expression <span style="background-color: rgb(251, 238, 184);">eq.left</span> and a/b+c by the expression <span style="background-color: rgb(251, 238, 184);">eq.right. </span>

```
eq = (x^2-1+y == a/b+c);

lhs = eq.left;

show lhs;

rhs = eq.right;

show rhs;

save as sides;
```

**Output**

   <style>
        .box {
            width: 200px;
            height: 70px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box">
  "lhs" → -1 + x^2 + y 
  <br>
"rhs" → a/b + c
</div>

<hr style="border: 0; height: 1px; background-color: #ccc;">

<span style="color: rgb(0, 0, 0);white-space: pre-wrap;">The programmer is not required to use a symbol e.g. eq for this . access, as long as using the ( ) operator the results would be the same:</span>

```
tmp = (x^2-1+y == a/b+c).left;

show tmp;

save as lhsrhs;
```


**Output**

   <style>
        .box2 {
            width: 200px;
            height: 50px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box2">
  "tmp" → -1 + x^2 + y 
</div>

<hr style="border: 0; height: 1px; background-color: #ccc;">

#### ⊕

In Free Form Programming Language (ff), the Symbol ⊕ is one of several unassigned operators.

> <span style="color: rgb(0, 0, 0);">As you can see the . operator works perfectly even if the operator in use is not defined! This is a core language aspect of ff that allows undefined variables as well as undefined functions and undefined operators alike.</span>

```
eq = (x^2-1+y)  ⊕  (a/b+c);

lhs = eq.left;

show lhs;

rhs = eq.right;

show rhs;

save as sides;
```


**Output**

   <style>
        .box {
            width: 200px;
            height: 90px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box">
  "lhs" → -1 + x^2 + y 
  <br>
"rhs" → a/b + c
</div>

<hr style="border: 0; height: 1px; background-color: #ccc;">

Try different operators.

```
eq = (x^2-1+y)  <=  (a/b+c);

lhs = eq.left;

show lhs;

rhs = eq.right;

show rhs;

save as sides;
```

**Output**

   <style>
        .box {
            width: 200px;
            height: 70px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box">
  "lhs" → -1 + x^2 + y 
  <br>
"rhs" → a/b + c
</div>

<hr style="border: 0; height: 1px; background-color: #ccc;">

<p style= "color: orange;font-size: 10px;"> <b>© 2012-Present CCN Studios</b> </p>

<p style= "color: orange;font-size: 10px">
<b>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 </b>
</p>

# Subtract from Sides

<p class="callout info"><span style="white-space: pre-wrap;"><b>What</b>: Subtract the same expression from the both sides of ==  
<b>Why</b><span style="white-space: pre-wrap;">: Such side-wise subtraction is an essential computation for solving equations </span>  
<b>Time to Complete</b><span style="white-space: pre-wrap;">: 3 hours </span></p>

```
eq = (x -3 == 17*y + 9);

lhs = eq.left - 9; 
rhs = eq.right - 9;

eq2 = (lhs == rhs);

show eq2;

save as sides;
```

Output

"eq2" → -12 + x == 17*y

**Output**

   <style>
        .box {
            width: 200px;
            height: 70px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box">
  "lhs" → (-12 + x)/17
  <br>
"rhs" → y
</div>


<hr style="border: 0; height: 1px; background-color: #ccc;">

<p style= "color: orange;font-size: 10px;"> <b>© 2012-Present CCN Studios</b> </p>

<p style= "color: orange;font-size: 10px">
<b>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 </b>
</p>

# Add to Sides

<p class="callout info"><span style="white-space: pre-wrap;"><b>What</b>: Add the same expression to the both sides of == .
<b>Why</b><span style="white-space: pre-wrap;">: Such side-wise addition is an essential computation for solving equations. </span>  
<b>Time to Complete</b><span style="white-space: pre-wrap;">: 3 hours. </span></p>

```
eq = (x -3 == 17*y - 9);

lhs = eq.left + 9; 
rhs = eq.right + 9;

eq2 = (lhs == rhs);

show eq2;
```

**Output**

   <style>
        .box {
            width: 200px;
            height: 70px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box">
"eq2" → 6 + x == 17y

</div>


<hr style="border: 0; height: 1px; background-color: #ccc;">

<p style= "color: orange;font-size: 10px;"> <b>© 2012-Present CCN Studios</b> </p>

<p style= "color: orange;font-size: 10px">
<b>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 </b>
</p>

# Divide both Sides

<p class="callout info"><span style="white-space: pre-wrap;"><b>What</b>: Divide both sides of == by the same expression.
<b>Why</b><span style="white-space: pre-wrap;">: Such side-wise division is an essential computation for solving equations. </span>  
<b>Time to Complete</b><span style="white-space: pre-wrap;">: 3 hours. </span></p>

```
eq = (x - 3 == 17*y);

lhs = eq.left / 17; 
rhs = eq.right /17;

eq2 = (lhs == rhs);

show eq2;

save as lhsrhs;
```

**Output**

   <style>
        .box {
            width: 200px;
            height: 70px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box">
"eq2" → (-3 + x)/17 == y

</div>


<hr style="border: 0; height: 1px; background-color: #ccc;">

<p style= "color: orange;font-size: 10px;"> <b>© 2012-Present CCN Studios</b> </p>

<p style= "color: orange;font-size: 10px">
<b>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 </b>
</p>

# Multiply both Sides

<p class="callout info"><span style="white-space: pre-wrap;"><b>What</b>: Multiply both sides of == by the same expression.
<b>Why</b><span style="white-space: pre-wrap;">: Such side-wise multiplication is an essential computation for solving equations. </span>  
<b>Time to Complete</b><span style="white-space: pre-wrap;">: 4 hours. </span></p>
  
```
eq = (x - 3 == y / 13);

lhs = eq.left * 13; 
rhs = eq.right * 13;

eq2 = (lhs == rhs);

show eq2;
```

Output

"eq2" → 13*(-3 + x) == y



**Output**

   <style>
        .box {
            width: 200px;
            height: 70px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box">
"eq2" → 13*(-3 + x) == y

</div>


<hr style="border: 0; height: 1px; background-color: #ccc;">

##### Apply expand[ ] to one side
```
eq = (x - 3 == y / 13);

lhs = eq.left * 13; 
rhs = eq.right * 13;

eq2 = (lhs == rhs);

show eq2;

lhs = expand[eq2.left]; 
rhs = eq2.right;

eq3 = (lhs == rhs);

show eq3;

save as lhsrhs;
```

**Output**

   <style>
        .box {
            width: 200px;
            height: 70px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box">
"eq2" → 13*(-3 + x) == y
"eq3" → -39 + 13*x == y
</div>

<hr style="border: 0; height: 1px; background-color: #ccc;">

<p style= "color: orange;font-size: 10px;"> <b>© 2012-Present CCN Studios</b> </p>

<p style= "color: orange;font-size: 10px">
<b>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 </b>
</p>