Tag Archives: equation

Presenting binary operations

This is the first of a set of notes I am writing to help me develop my thoughts about how particular topics in my book Abstracting algebra should be organized. This article describes my plan for the book in some detail. The present post has some thoughts about presenting binary operations.

Before binary operations are introduced

Traditionally, an abstract algebra book assumes that the student is familiar with high school algebra and will then proceed with an observation that such operations as $+$ and $\times$ can be thought of as functions of two variables that take a number to another number. So the first abstract idea is typically the concept of binary operation, although in another post I will consider whether that really should be the first abstract concept.

The Abstracting Algebra book will have a chapter that presents concrete examples of algebraic operations and expressions on numbers as in elementary school and as in high school algebra. This section of the post outlines what should be presented there. Each subsection needs to be expanded with lots of examples.

In elementary school

In elementary school you see expressions such as

  • $3+4$
  • $3\times 4$
  • $3-4$

The student invariably thinks of these expressions as commands to calculate the value given by the expression.

They will also see expressions such as
\[\begin{equation}
\begin{array}[b]{r}
23\\
355\\
+ 96\\
\hline
\end{array}
\end{equation}\]
which they will take as a command to calculate the sum of the whole list:
\[\begin{equation}
\begin{array}[b]{r}
23\\
355\\
+ 96\\
\hline
474
\end{array}
\end{equation}\]

That uses the fact that addition is associative, and the format suggests using the standard school algorithm for adding up lists. You don’t usually see the same format with more than two numbers for multiplication, even though it is associative as well. In some elementary schools in recent years students are learning other ways of doing arithmetic and in particular are encouraged to figure out short cuts for problems that allow them. But the context is always “do it”, not “this represents a number”.

Algebra

In algebra you start using letters for numbers. In algebra, “$a\times b$” and “$a+b$” are expressions in the symbolic language of math, which means they are like noun phrases in English such as “My friend” and “The car I bought last week and immediately totaled” in that both are used semantically as names of objects. English and the symbolic language are both languages, but the symbolic language is not a natural language, nor is it a formal language.

Example

In beginning algebra, we say “$3+5=8$”, which is a (true) statement.

Basic facts about this equation:

The expressions “$3+5$” and “$8$”

  • are not the same expression
  • but in the standard semantics of algebra they have the same meaning
  • and therefore the equation communicates information that neither “$3+5$” nor “$8$” communicate.

Another example is “$3+5=6+2$”.

Facts like this example need to be communicated explicitly before binary operations are introduced formally. The students in a college abstract algebra class probably know the meaning of an equation operationally (subconsciously) but they have never seen it made explicit. See Algebra is a difficult foreign language.

Note

The equation “$3+5=6+2$” is an expression just as much as “$3+5$” and “$6+2$” are. It denotes an object of type “equation”, which is a mathematical object in the same way as numbers are. Most mathematicians do not talk this way, but they should.

Binary operations

Early examples

Consciousness-expanding examples should appear early and often after binary operations are introduced.

Common operations

  • The GCD is a binary operation on the natural numbers. This disturbs some students because it is not written in infix form. It is associative. The GCD can be defined conceptually, but for computation purposes needs (Euclid’s) algorithm. This gives you an early example of conceptual definitions and algorithms.
  • The maximum function is another example of this sort. This is a good place to point out that a binary operation with the “same” definition cen be defined on different sets. The max function on the natural numbers does not have quite the same conceptual definition as the max on the integers.

Extensional definitions

In order to emphasize the arbitrariness of definitions, some random operations on a small finite sets should be given by a multiplication table, on sets of numbers and sets represented by letters of the alphabet. This will elicit the common reaction, “What operation is it?” Hidden behind this question is the fact that you are giving an extensional definition instead of a formula — an algorithm or a combination of familiar operations.

Properties

The associative and commutative properties should be introduced early just for consciousness-raising. Subtraction is not associative or commutative. Rock paper scissors is commutative but not associative. Groups of symmetries are associative but not commutative.

Binary operation as function

The first definition of binary operation should be as a function. For example, “$+$” is a function that takes pairs of numbers to numbers. In other words, $+:\mathbb{Z}\times\mathbb{Z}\to\mathbb{Z}$ is a function.

We then abstract from that example and others like it from specific operations to arbitrary functions $\Delta:S\times S\to S$ for arbitrary sets $S$.

This is abstraction twice.

  • First we replace the example operations by an arbitrary operation. such as multiplication, subtraction, GCD and MAX on $\mathbb{Z}$, or something complicated such as \[(x,y)\mapsto 3(xy-1)^2(x^2+xy^3)^3\].
  • Then we replace sets of numbers by arbitrary sets. An example would be the random multiplication on the set $\{1,2,5\}$ given by the table
    \[
    \begin{array}{c|ccc}
    \Delta& 1&2&5\\
    \hline
    1&2&2&1\\
    2&5&2&1\\
    5&2&1&5
    \end{array}
    \]
    This defines a function $\Delta:\{1,2,5\}\times\{1,2,5\}\to\{1,2,5\}$ for which for example $\Delta(2,1)=5$, or $2\Delta 1=5$. This example uses numbers as elements of the set and is good for eliciting the “What operation is it?” question.
  • I will use examples where the elements are letters of the alphabet, as well. That sort of example makes the students think the letters are variables they can substitute for, another confusion to be banished by the wise professor who know the right thing to say to make it clear. (Don’t ask me; I taught algebra for 35 years and I still don’t know the right thing to say.)

It is important to define prefix notation and infix notation right away and to use both of them in examples.

Other representations of binary operations.

The main way of representing binary operations in Abstracting Algebra will be as trees, which I will cover in later posts. Those posts will be much more interesting than this one.

Binary operations in high school and college algebra

  • Some binops are represented in infix notation: “$a+b$”, “$a-b$”, and “$a\times b$”.
  • “$a\times b$” is usually written “$ab$” for letters and with the “$\times$” symbol for numbers.
  • Some binops have idiosyncratic representation: “$a^b$”, “${a}\choose{b}$”.
  • A lot of binops such as GCD and MAX are given as functions of two variables (prefix notation) and their status as binary operations usually goes unmentioned. (That is not necessarily wrong.)
  • The symbol “$(a,b)$” is used to denote the GCD (a binop) and is also used to denote a point in the plane or an open interval, both of which are not strictly binops. They are binary operations in a multisorted algebra (a concept I expect to introduce later in the book.)
  • Some apparent binops are in infix notation but have flaws: In “$a/b$”, the second entry can’t be $0$, and the expression when $a$ and $b$ are integers is often treated as having good forms ($3/4$) and bad forms ($6/8$).

Trees

The chaotic nature of algebraic notation I just described is a stumbling block, but not the primary reason high school algebra is a stumbling block for many students. The big reason it is hard is that the notation requires students to create and hold complicated abstract structures in their head.

Example

This example is a teaser for future posts on using trees to represent binary operations. The tree below shows much more of the structure of a calculation of the area of a rectangle surmounted by a semicircle than the expression

\[A=wh+\frac{1}{2}\left(\pi(\frac{1}{2}w)^2\right)\]
does.

The tree explicitly embodies the thought process that leads to the formula:

  • You need to add the area of the rectangle and the area of the semicircle.
  • The area of the rectangle is width times height.
  • The area of the semicircle is $\frac{1}{2}(\pi r^2)$.
  • In this case, $r=\frac{1}{2}w$.

Any mathematician will extract the same abstract structure from the formula\[A=wh+\frac{1}{2}\left(\pi(\frac{1}{2}w)^2\right)\] This is difficult for students beginning algebra.

References

Creative Commons License

This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.


Send to Kindle

Explaining math

The interactive examples in this post require installing Wolfram CDF player, which is free and works on most desktop computers using Firefox, Safari and Internet Explorer, but not Chrome. The source code is the Mathematica Notebook SolvEq.nb, which is available for free use under a Creative Commons Attribution-ShareAlike 2.5 License. The notebook can be read by CDF Player if you cannot make the embedded versions in this post work.

This post explains some basic distinctions that need to be made about the process of writing and explaining math.  Everyone who teaches math knows subconsciously what is happening here; I am trying to raise your consciousness.  For simplicity, I have chosen a technique used in elementary algebra, but much of what I suggest also applies to more abstract college level math.

An algebra problem

Solve the equation "$ax=b$" ($a\neq0$).

Understanding the statement of this problem requires a lot of Secret Knowledge (the language of ninth grade algebra) that most people don't have.

  • The expression "$ax$" means that $a$ and $x$ are numbers and $ax$ is their product. It is not the word "ax". You have to know that writing two symbols next to each other means multiply them, except when it doesn't mean multiply them as in "$\sin\,x$".

  • The whole expression "$ax=b$" ostensibly says that the number $ax$ is the same number as $b$.  In fact, it means more than that. The phrase "solve the equation" tells you that in fact you are supposed to find the value of $x$ that makes $ax$ the same number as $b$.

  • How do you know that "solve the equation" doesn't mean find the value of $a$ that makes $ax$ the same number as $b$? Answer: The word "solve" triggers a convention that $x$, $y$ and $z$ are numbers you are trying to find and $a$, $b$, $c$ stand for numbers that you are allowed to plug in to the equation.

  • The conventions of symbolic math require that you give a solution for any nonzero value of $a$ and any value of $b$.  You specifically are not allowed to pick $a=1$ and $b=33$ and find the value just for those numbers.  (Some college calculus students do this with problems involving literal coefficients.)

  • The little thingy "$(a\neq0)$" must be read as a constraint on $a$.  It does not mean that $a\neq0$ is a fact that you ought to know. ( I've seen college math students make this mistake, admittedly in more complex situations). Nor does it mean that you can't solve the problem if $a=0$ (you can if $b$ is also zero!).

So understanding what this problem asks, as given, requires (fairly sophisticated in some cases) pattern recognition both to understand the symbolic language it uses, and also to understand the special conventions of the mathematical English that it uses.

Explicit descriptions

This problem could be reworded so that it gives an explicit description of the problem, not requiring pattern recognition.  (Warning: "Not requiring pattern recognition" is a fuzzy concept.)  Something like this:  

You have two numbers $a$ and $b$.  Find a number $c$ for which if you multiply $a$ by $c$ you get $b$.

This version is not completely explicit.  It still requires understanding the idea of referring to a number by a letter, and it still requires pattern recognition to catch on that the two occurrences of each letter means that their meanings have to match. Also, I know from experience that some American first year college students have trouble with the syntax of the sentence ("for which…", "if…").

The following version is more explicit, but it cheats by creating an ad hoc way to distinguish the numbers.

Alice and Bob each give you a number.  How do you find a number with the property that Alice's number times your number is equal to Bob's number? 

If the problem had a couple more variables it would be so difficult to understand in an explicit form that most people would have to draw a picture of the relationships between them.  That is why algebraic notation was invented.

Visual descriptions

Algebra is a difficult foreign language.  Showing the problem visually makes it easier to understand for most people. Our brain's visual processing unit is the most powerful tool the brain has to understand things.  There are various ways to do this.  

Visualization can help someone understand algebraic notation better.  

You can state the problem by producing examples such as

  • $\boxed{3}\times\boxed{\text{??}}=\boxed{6}$ 
  • $\boxed{5}\times\boxed{\text{??}}=\boxed{2}$ 
  • $\boxed{42}\times\boxed{\text{??}}=\boxed{24}$

where the reader has to know the multiplication symbol and, one hopes, will recognize "$\boxed{\text{??}}$" as "What's the value?". But the reader does not have to understand what it means to use letters for numbers, or that "$x$ means you are suppose to discover what it is".  This way of writing an algebra problem is used in some software aimed at K-12 students.  Some of them use a blank box instead of "$\boxed{\text{??}}$".

Such software often shows the algorithm for solving the problem visually, using algebraic notation like this:

I have put in some buttons to show numbers as well as $a$ and $b$.  If you have access to Mathematica instead of just to CDF player, you can load SolvEq.nb and put in any numbers you want, but CDF's don't allow input data. 

You can also illustrate the algorithm using the tree notation for algebra I used in Monads for high school I  (and other posts). The demo below shows how to depict the value-preserving transformation given by the algorithm.  (In this case the value is the truth since the root operation is equals.)

This demo is not as visually satisfactory as the one illustrating the use of the associative law in Monads for high school I.  For one thing, I had to cheat by reversing the placement of $a$ and $x$.  Note that I put labels for the numerator and denominator legs, a practice I have been using in demos for a while for noncommutative operations.  I await a new inspiration for a better presentation of this and other equation-solving algorithms.

Another advantage of using pictures is that you can often avoid having to code things as letters which then has to be remembered.  In Monads for high school I, I used drawings of the four functions from a two-element set to itself instead of assigning them letters.  Even mnemonic letters such as $s$ for "switch" and $\text{id}$ for the identity element carry a burden that the picture dispenses with.

Send to Kindle

Computable algebraic expressions in tree form

Invisible algebra

  1. An  expression such as $4(x-2)=6$ has an invisible abstract structure.  In this simple case it is

using the style of presenting trees used in academic computing science.  The parentheses are a clue to the structure; omitting them results in  $4x-2=6$, which has the different structure

By the time students take calculus they supposedly have learned to perceive and work with this invisible structure, but many of them still struggle with it.  They have a lot of trouble with more complex expressions, but even something like $\sin x + y$ gives some of them trouble.

Make the invisible visible

The tree expression makes the invisible structure explicit. Some math educators such as Jason Dyer and Bret Victor have experimented with the idea of students working directly with a structured form of an algebraic expression, including making the structured form interactive.

How could the tree structure be used to help struggling algebra students?

1) If they are learning on the computer, the program could provide the tree structure at the push of a button. Lessons could be designed to present algebraic expressions that look similar but have different structure.

2) You could point out things such as:

a) “inside the parentheses pushes it lower in the tree”
b) “lower in the tree means it is calculated earlier”

3) More radically, you could teach algebra directly using the tree structure, with the intention of introducing the expression-as-a-string form later.  This is analogous to the use of the initial teaching alphabet for beginners at reading, and also the use of shape notes to teach sight reading of music for singing.  Both of these methods have been shown to help beginners, but the ITA didn’t catch on and although lots of people still sing from shape notes (See Note 1) they are not as far as I know used for teaching in school.

4) You could produce an interactive form of the structure tree that the student could use to find the value or solve the equation.  But that needs a section to itself.

Interactive trees

When I discovered the TreeForm command in Mathematica (which I used to make the trees above), I was inspired to use it and the Manipulate command to make the tree interactive.


This is a screenshot of what Mathematica shows you.  When this is running in Mathematica, moving the slide back and forth causes the dependent values in the tree also change, and when you slide to 3.5, the slot corresponding to $ 4(x-2)$ becomes 6 and the slot over “Equals” becomes “True”:

As seen in this post, these are just screen shots that you can’t manipulate.  The Mathematica notebook Expressions.nb gives the code for this and lets you experiment with it.  If you don’t have Mathematica available to you, you can still manipulate the tree with the slider if you download the CDF form of the notebook and open it in Mathematica CDF Player, which is available free here.  The abstractmath website has other notebooks you may want to look at as well.

Moving the slider back and forth constitutes finding the correct value of x by experiment.  This is a peculiar form of bottom-up evaluation.   With an expression whose root node is a value rather than an equation, wiggling the slider constitutes calculating various values with all the intermediate steps shown as you move it.  Bret Victor s blog shows a similar system, though not showing the tree.

Another way to use the tree is to arrange to show it with the calculated values blank.  (The constants and the labels showing the operation would remain.)   The student could start at the top blank space (over Times)  and put in the required value, which would obviously have to be 6 to make the space over Equals change to “True”.  Then the blank space over Plus would have to be 1.5 in order to make multiplying it by 4 be 6.  Then the bottom left blank space would have to be 3.5 to make it equal to 1.5 when -2 is added.  This is top down evaluation.

You could have the student enter these numbers in the blank spaces on the computer or print out the tree with blank spaces and have them do it with a pencil.  Jason Dyer’s blog has examples.

Implementation

My example code in the notebook is a kludge.  If you defined a  special VertexRenderingFunction for TreeForm in Mathematica, you could create a function that would turn any algebraic expression into a manipulatable tree with a slider like the one above (or one with blank spaces to be filled in).  [Note 2]. I expect I will work on that some time soon but my main desire in this series of blog posts is to through out ideas with some Mathematica code attached that others might want to develop further. You are free to reuse all the Mathematica code and all my blog posts under the Creative Commons Attribution – ShareAlike 3.0 License.  I would like to encourage this kind of open-source behavior.

Notes

1. Including me every Tuesday at 5:30 pm in Minneapolis (commercial).

2. There is a problem with Equals.  In the hacked example above I set the increment the value jumps by when the slider is moved to 0.1, so that the correct value 3.5 occurs when you slide.  If you had an equation with an irrational root this would not work.  One thing that should work is to introduce a fuzzy form of Equals with the slide-increment smaller that the latitude allowed in the fuzzy Equals.

Send to Kindle