This post has been turned into a page on WordPress, accessible in the upper right corner of the screen. The page will be referred to by all topic posts for Abstracting Algebra.
This post has been turned into a page on WordPress, accessible in the upper right corner of the screen. The page will be referred to by all topic posts for Abstracting Algebra.
This is the first in a series of articles about how algebra could be implemented without using the standard language of algebra that so many people find difficult. The code for the graphs are in the Mathematica notebook Algebra1.nb.

Suppose you are designing a window that is in the shape of a rectangle surmounted by a semicircle, shown above for the window with width 2 and rectangle height 3.
This example occurs in a tiresomely familiar calculus problem where you put a constraint on the perimeter of the window, thus turning it into a one-variable problem, then finding the values of the width and height that give the maximum area. In this post, I am not going to get that far. All I will do is come up with a calculation for the area. I will describe a way you might do it on a laptop five or ten years from now.
You have an algebra application that shows a screen with some operations that you may select to paste into your calculation. The ones we use are called plus, times, power, value and input. You choose a function called value, and label it "Area of window". You recognize that the answer is the sum of the areas of the rectangle and the area of the semicircle, so you choose plus and attach to it two inputs which you label "area of rectangle" and "area of semicircle", like this:
The notational metaphor is that the computation starts at the bottom and goes upward, performing the operations indicated.
You know (or are told by the system) that the area of a rectangle is the product of its width and height, so you replace the value called "area of rectangle" with a times button and attach two values called $w$ and $h$:
You also determine that the area under the semicircle is half the area of a circle of radius $r$ (where $r$ must be calculated).
You have a function for the area of a circle of radius $r$, so you attach that:

Finally, you use the fact that you know that the semicircle has a radius which is half the width of the rectangle.

Now, to make the calculation operational, you attach two inputs named "width" and "height" and feed them into the values $w$ and $h$. When you type numbers into these buttons, the calculation will proceed upward and finally show the area of the window at the top.
In a later post I will produce a live version of this diagram. (Added 2012-09-08: the live version is here.) Right now I want to get this post out before I leave for MathFest. (I might even produce the live version at MathFest, depending on how boring the talks are.)
You can see an example of a live calculation resembling this in my post A visualization of a computation in tree form.
To manipulate the demo in this post, you must have Wolfram CDF Player installed on your computer. It is available free from the Wolfram website.
The demo currently shows a banner that says "This file contains potentially unsafe dynamic content". You can view the diagram by clicking on the "Enable Dynamics" button. If and when I figure out how to get rid of the banner, this paragraph will disappear from the post!
The Riemann Sum is a complicated idea. The integral \[\int_a^b f(x)\,dx\] involves three parameters: two numbers $a$ and $b$ and the function $x\mapsto f(x)$. These are not freely varying parameters: They are subject to the requirements
A particular Riemann Sum for this integral looks like \[\sum_{i=1}^n f(p_i)(x_i-x_{i-1})\]
It has three more parameters, a number and two lists of numbers satisfying some complicated conditions:
A Riemann sum may or may not have various important properties.
So the concept is complex, with several constituents and interrelationships to hold in your head all at once. Experienced math people learn concepts like this all the time. Math students have a harder time. Manipulable diagrams can help. Here is an example:
In a class where students use computers with CDF Player installed, you could give them this demo along with instructions about how to use it and a list of questions that they must answer.
Examples of instructions
Sample questions
There are many other questions like this you can ask. After answering some of them, I claim (without proof) that the students will have a much better understanding of Riemann sums.
Note that teachers can use this Demo without knowing anything at all about Mathematica. There are hundreds of Demos available in the cloud that can be used in the same way; many of the best are on the Wolfram Demonstration Project.
If you can program some in Mathematica, you can take the source code for this demo and modify it, for example to use other functions, to provide functions with changeable parameters and to use partitions following dynamic rules.
You could also have this up on a screen in your classroom for class discussion. But I doubt that is the best use. For classroom demos you probably need simple on-off demos that you prepare ahead or even write on the spot. An example of a simple demo is in the post Offloading Abstraction. I will talk about simple demos more in a later post.
A teacher in the past would draw an example of a RIemann sum on the blackboard and talk about a few features as they point at the board. Nowadays, teachers have slides with accurately drawn Riemann sums and books have pictures of them. This sort of thing gives the student a picture which (hopefully) stays in their head. That picture is a kind of metaphor which enables you to think of the sum in terms of something that you are familiar with, just as you can think of a function as position and its derivative as velocity. (Position and velocity are familiar from driving or any other kind of moving. The picture of a Riemann sum is not something you knew before you studied them, but your brain has remarkable abilities to absorb a picture and the relations between parts of the picture, so once you have seen it you can call it up whenever you think of Riemann sums.)
But there are a lot of aspects of Riemann sums that cannot be demonstrated by a still picture. When the mesh gets finer, the value of the sum tends to be closer to the exact value of the integral. You can stare at the still picture and sort of visualize this. Can you visualize a situation where changing to a finer mesh could make the error worse? If someone suggests a high-frequency sine wave, can you visualize in your head why a finer mesh might make it worse?
An elaborate demo with lots of push buttons is something for students to play with on their own time and thereby gain a better understanding of the topic. Before manipulable diagrams the only way you could do this was produce physical models. I don't know of anyone who produced a physical model of a Riemann sum. It is possible to do so with some parameters changeable but it would be difficult and not as flexible as the demo given here.
The world has more possibilities. Use them.
Related posts
An elaborate Riemann Sum Demo (Mathematica notebook, source of the demo in this post)
Freezing a family of functions (previous post)
Images and Metaphors (in abstractmath.org)
Offloading abstraction (previous post)
Note: To manipulate the diagrams in this post and in most of the files it links to, you must have Wolfram CDF Player installed on your computer. It is available free from the Wolfram website.
The diagram above shows you the tangent line to the curve $y=x^3-x$ at a specific point. The slider allows you to move the point around, and the tangent line moves with it. You can click on one of the plus signs for options about things you can do with the slider. (Note: This is not new. Many other people have produced diagrams like this one.)
I have some comments to make about this very simple diagram. I hope they raise your consciousness about what is going on when you use a manipulable demonstration.
A diagram showing a tangent line drawn on the board or in a paper book requires you visualize how the tangent line would look at other points. This imposes a burden of visualization on you. Even if you are a new student you won't find that terribly hard (am I wrong?) but you might miss some things at first:
You see these things immediately when you manipulate the slider.
Manipulating the slider reduces the load of abstract thinking in your learning process. You have less to keep in your memory; some of the abstract thinking is offloaded onto the diagram. This could be described as contracting out (from your head to the picture) part of the visualization process. (Visualizing something in your head is a form of abstraction.)
Of course, reading and writing does that, too. And even a static graph of a function lowers your visualization load. What interactive diagrams give the student is a new tool for offloading abstraction.
You can also think of it as providing external chunking. (I'll have to think about that more…)
The diagram above is very simple with no bells and whistles. People have come up with much more complicated diagrams to illustrate a mathematical point. Such diagrams:
Such complicated diagrams are better suited for the student to play with at home, or to play with in class with a partner (much better than doing it by yourself). When the teacher first explains a concept, the diagrams ought to be simple.
This blog has a category "Mathematica" which contains all the graphs (many of the interactive) that are designed as an aid to offloading abstraction.
The emerging theory of how the brain works gives us a new language to us for discussing how we teach, learn and communicate math.
Our minds have many functionalities. They are implemented by what I called modules in Math and modules of the mind because I don’t understand very much about what cognitive scientists have learned about how these functionalities are carried out. They talk about a particular neuron, a collection of neurons, electrical charges flowing back and forth, and so on, and it appears there is no complete agreement about these ideas.
The functions the modules implement are physical structures or activities in the brain. At a certain level of abstraction we can ignore the mechanism.
Most modules carry out functionalities that are hidden from our consciousness.
Reasoning, for example if you add 56 and 49 in your head, has part of the process visible to your introspection, but not all of it. It uses modules such as the sum of 9 and 6 which feel like random access memory. When you carry the addition out, you (or at least I) are conscious of the carry: you are aware of it and aware of adding it to 9 to get 10.
Good places to find detailed discussion of this hiddenness are references [2] and [4] below.
Math ed people have talked for years about the technique of chunking in doing math.
Students have a hard time doing that. When an experienced mathematician does this, they are very likely to chunk subconsciously; they don’t think, “Now I am chunking”. Nevertheless, you can call it to their attention and they will be aware of the process.
There are modules that perform chunking whose operation you cannot be aware of even if you think about it. Here are two examples.
Example 1. Consider these two sentences from [2], p. 137:
When you read the first one you visualize a river bank. When you read the second one you visualize a bank as an institution that handles money. If these two sentences were separated by a couple of paragraphs, or even a few words, in a text you are likely not to notice that you have processed the same word in two different ways. (When they are together as above it is kind of blatant.)
The point is the when you read each sentence your brain directly presents you with the proper image in each case (different ones as appropriate). You cannot recover the process that did that (by introspection, anyway).
Example 2. I discussed the sentence below in the Handbook. The sentence appears in references [3].
…Richard Darst and Gerald Taylor investigated the
differentiability of functions $latex f^p$ (which for our
purposes we will restrict to $latex (0,1)$) defined for
each $latex p\geq1$ by
In this sentence, the identical syntax $latex (a,b)$ appears twice; the first occurrence refers to the open interval from 0 to 1 and the second refers to the GCD of integers m and n. When I first inserted it into the Handbook’s citation list, I did not notice that (I was using it for another phenomenon, although now I have forgotten what it was). Later I noticed it. My mind preprocessed the two occurrences of the syntax and threw up two different meanings without my noticing it.
Of course, “restricting to (0, 1)” doesn’t make sense if (0, 1) means the GCD of 0 and 1, and saying “(m, n) = 1” doesn’t make sense if (m, n) is an interval. This preprocessing no doubted came to its two different conclusions based on such clues, but I claim that this preprocessing operated at a much deeper level of the brain than the preprocessing that results in your thinking (for example) of a topological space as a single unstructured object in a category.
This phenomenon could be called prechunking. It is clearly a different phenomenon that zooming in on a denominator and then zooming out on the whole expression as I described in [1].
In the nineteenth century we came up with a machine metaphor for how we think. In the twentieth century the big metaphor was our brain is a computer. This century’s metaphor is that of a bunch a processes in our brain and in our body all working simultaneously, mostly out of our awareness, to enable us to live our life, learn things, and just as important (as Davidson [4] points out) to unlearn things. But don’t think we have Finally Discovered The Last Metaphor.
This post is a first pass at what will eventually be a section of abstractmath.org. It’s time to get back to abstractmath; I have been neglecting it for a couple of years.
What I say here is based mainly on my many years of teaching discrete mathematics at Case Western Reserve University in Cleveland and more recently at Metro State University in Saint Paul.
Beginning abstract math
College students typically get into abstract math at the beginning in such courses as linear algebra, discrete math and abstract algebra. Certain problems that come up in those early courses can be grouped together under the notion of (what I call) applying templates [note 0]. These are not the problems people usually think about concerning beginners in abstract math, of which the following is an incomplete list:
The students’ problems discussed here concern understanding what a template is and how to apply it.
Templates can be formulas, rules of inference, or mini-programs. I’ll talk about three examples here.
The template for quadratic equations
The solution of a real quadratic equation of the form $latex {ax^2+bx+c=0}&fg=000000$ is given by the formula
$latex \displaystyle x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}&fg=000000$
This is a template for finding the roots of the equations. It has subtleties.
For example, the numerator is symmetric in $latex {a}&fg=000000$ and $latex {c}&fg=000000$ but the denominator isn’t. So sometimes I try to trick my students (warning them ahead of time that that’s what I’m trying to do) by asking for a formula for the solution of the equation $latex {a+bx+cx^2=0}&fg=000000$. The answer is
$latex \displaystyle x=\frac{-b\pm\sqrt{b^2-4ac}}{2c}&fg=000000$
I start writing it on the board, asking them to tell me what comes next. When we get to the denominator, often someone says “$latex {2a}&fg=000000$”.
The template is telling you that the denominator is 2 times the coefficient of the square term. It is not telling you it is “$latex {a}&fg=000000$”. Using a template (in the sense I mean here) requires pattern matching, but in this particular example, the quadratic template has a shallow incorrect matching and a deeper correct matching. In detail, the shallow matching says “match the letters” and the deep matching says “match the position of the letters”.
Most of the time the quadratic being matched has particular numbers instead of the same letters that the template has, so the trap I just described seldom occurs. But this makes me want to try a variation of the trick: Find the solution of $latex {3+5x+2x^2=0}&fg=000000$. Would some students match the textual position (getting $latex {a=3}&fg=000000$) instead of the functional position (getting $latex {a=5}&fg=000000$)? [Note [0]). If they did they would get the solutions $latex {(-1,-\frac{2}{3})}&fg=000000$ instead of $latex {(-1,-\frac{3}{2})}&fg=000000$.
Substituting in algebraic expressions have other traps, too. What sorts of mistakes would students have solving $latex {3x^2+b^2x-5=0}&fg=000000$?
Most students on the verge of abstract math don’t make mistakes with the quadratic formula that I have described. The thing about abstract math is that it uses more sophisticated templates
The template for proof by induction
This template gives a method of proof of a statement of the form $latex {\forall{n}\mathcal{P}(n)}&fg=000000$, where $latex {\mathcal{P}}&fg=000000$ is a predicate (presumably containing $latex {n}&fg=000000$ as a variable) and $latex {n}&fg=000000$ varies over positive integers. The template says:
Goal: Prove $latex {\forall{n}\mathcal{P}(n)}&fg=000000$.
Method:
For example, to prove $latex {\forall n (2^n+1\geq n^2)}&fg=000000$ using the template, you have to prove that $latex {2^2+1\geq 1^1}&fg=000000$, and that for any $latex {n>1}&fg=000000$, if $latex {2^n+1\geq n^2}&fg=000000$, then $latex {2^{n+1}+1\geq (n+1)^2}&fg=000000$. You come up with the need to prove these statements by substituting into the template. This template has several problems that the quadratic formula does not have.
Variables of different types
The variable $latex {n}&fg=000000$ is of type integer and the variable $latex {\mathcal{P}}&fg=000000$ is of type predicate [note 0]. Having to deal with several types of variables comes up already in multivariable calculus (vectors vs. numbers, cross product vs. numerical product, etc) and they multiply like rabbits in beginning abstract math classes. Students sometimes write things like “Let $latex {\mathcal{P}=n+1}&fg=000000$”. Multiple types is a big problem that math ed people don’t seem to discuss much (correct me if I am wrong).
Free and bound
The variable $latex {n}&fg=000000$ occurs as a bound variable in the Goal and a free variable in the Method. This happens in this case because the induction step in the Method originates as the requirement to prove $latex {\forall n(\mathcal{P}(n)\rightarrow\mathcal{P}(n+1))}&fg=000000$, but as I have presented it (which seems to be customary) I have translated this into a requirement based on modus ponens. This causes students problems, if they notice it. (“You are assuming what you want to prove!”) Many of them apparently go ahead and produce competent proofs without noticing the dual role of $latex {n}&fg=000000$. I say more power to them. I think.
The template has variations
It’s like you can go to the store and buy one template for quadratic equations, but you have to by a package of templates for induction, like highway engineers used to buy packages of plastic French curves to draw highway curves without discontinuous curvature.
The template for row reduction
I am running out of time and won’t go into as much detail on this one. Row reduction is an algorithm. If you write it up as a proper computer program there have to be all sorts of if-thens depending on what you are doing it for. For example if want solutions to the simultaneous equations
| 2x+4y+z | = | 1 |
| x+2y | = | 0 |
| x+2y+4z | = | 5 |
you must row reduce the matrix
| 2 | 4 | 1 | 1 |
| 1 | 2 | 0 | 0 |
| 1 | 2 | 4 | 5 |
(I haven’t yet figured out how to wrap this in parentheses) which gives you
| 1 | 2 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 |
This introduces another problem with templates: They come with conditions. In this case the condition is “a row of three 0s followed by a nonzero number means the equations have no solutions”. (There is another condition when there is a row of all 0′s.)
It is very easy for the new student to get the calculation right but to never sit back and see what they have — which conditions apply or whatever.
When you do math you have to repeatedly lean in and focus on the details and then lean back and see the Big Picture. This is something that has to be learned.
What to do, what to do
I have recently experimented with being explicit about templates, in particular going through examples of the use of a template after explicitly stating the template. It is too early to say how successful this is. But I want to point out that even though it might not help to be explicit with students about templates, the analysis in this post of a phenomenon that occurs in beginning abstract math courses
Notes