Tag Archives: matrix multiplication

Dysfunctions in doing math I

I am in the middle of revising the article in abstractmath.org on dysfunctional attitudes and behaviors in doing math. Here are three of the sections I have finished.

Misuse of analogy

When William Rowan Hamilton was trying to understand the new type of number called quaternions (MW, Wik) that he invented, he assumed by analogy that like other numbers, quaternion multiplication was commutative. It was a major revelation to him that they were not commutative.

Analogy may suggest new theorems or ways of doing things. But it is fallible. What happens particularly often in abstract math is applying a rule to a situation where it is not appropriate. This is an easy trap to fall into when the notation in two different cases has the same form; that is an example of formal analogy.

Matrix multiplication

Matrix multiplication is not commutative

If $r$ and $s$ are real numbers then the products $rs$ and $sr$ are always the same number. In other words, multiplication of real numbers is commutative : $rs = sr$ for all real numbers $r$ and $s$.

The product of two matrices $M $and $N$ is written $MN$, just as for numbers. But matrix multiplication is not commutative. For example,
\[\left(
\begin{array}{cc}
1 & 2 \\
3 & 4\\
\end{array}
\right)
\left(
\begin{array}{cc}
3 & 1 \\
3 &2\\
\end{array}
\right)
=
\left(
\begin{array}{cc}
9 & 5\\
21 & 11 \\
\end{array}
\right)\]
but
\[\left(
\begin{array}{cc}
3 & 1 \\
3 & 2\\
\end{array}
\right)
\left(\begin{array}{cc}
1 & 2 \\
3 & 4\\
\end{array}
\right)
=
\left(
\begin{array}{cc}
6 & 10\\
91 & 14 \\
\end{array}
\right)\]
Because $rs = sr$ for numbers, the formal similarity of the notation suggests $MN$ = $NM$, which is wrong.

This means you can’t blindly manipulate $MNM$ to become $M^2N$. More generally, a law such as $(MN)^n=M^nN^n$ is not correct when $M$ and $N$ are matrices.


You must understand the meanings
of the symbols you manipulate.

The product of two nonzero matrices can be 0

If the product of two numbers is 0, then one or both of the numbers is zero. But that is not true for matrix multiplication:
\[\left(
\begin{array}{cc}
-2 & 2 \\
-1 & 1\\
\end{array}
\right)
\left(
\begin{array}{cc}
1 & 1 \\
1 &1\\
\end{array}
\right)
=
\left(
\begin{array}{cc}
0 &0\\
0 & 0 \\
\end{array}
\right)\]

Canceling sine

  • Beginning calculus students have already learned algebra.
  • They have learned that an expression such as $xy$ means $x$ times $y$.
  • They have learned to cancel like terms in a quotient, so that for example \[\frac{3x}{3y}=\frac{x}{y}\]
  • They have learned to write the value of a function $f$ at the input $x$ by $f(x)$.
  • They have seen people write $\sin x$ instead of $\sin(x)$ but have never really thought about it.
  • So they write \[\frac{\sin x}{\sin y}=\frac{x}{y}\]

This happens fairly often in freshman calculus classes. But you wouldn’t do that, would you?

Boundary values of definitions

Definitions are usually inclusive

Definitions of math concepts usually include the special cases they generalize.

Examples

  • A square is a special case of rectangle. As far as I know texts that define “rectangle” include squares in the definition. Thus a square is a rectangle.
  • A straight line is a curve.
  • A group is a semigroup.
  • An integer is a real number. (But not always in computing languages — see here.)

But not always

  • The axioms of a field include a bunch of axioms that a one-element set satisfies, plus a special axiom that does nothing but exclude the one-element set. So a field has to have at least two elements, and that fact does not follow from the other axioms.
  • Boolean algebras are usually defined that way, too, but not always. MathWorld gives several definitions of Boolean algebra that disagree on this point.

When boundary values are not special cases

Definitions may or may not include other types of boundary values.

Examples

  • If $S$ is a set, it is a subset of itself. The empty set is also a subset of $S$.
  • Similarly the divisors of $6$ are $-6$, $-3$, $-2$, $-1$, $1$, $2$, $3$ and $6$, not just $2$ and $3$ and not just $1$, $2$, $3$ and $6$ (there are two different boundaries here).

But …

  • The positive real numbers include everything bigger than $0$, but not $0$. ( Note).

Blunders

A definition that includes such special cases may be called inclusive; otherwise it is exclusive. People new to abstract math very commonly use words defined inclusively as if their definition was exclusive.

  • They say things such as “That’s not a rectangle, it is a square!” and “Is that a group or a semigroup?”
  • They object if you say “Consider the complex number $\pi $.”

This appears to be natural linguistic behavior. Even so, math is picky-picky: a square is a rectangle, a group is a semigroup and $\pi$ is a complex number (of course, it is also a real number).

Co-intimidator

  • You attend a math lecture and the speaker starts talking about things you never heard of.
  • Your fellow students babble at you about manifolds and tensors and you thought they were car parts and lamps.
  • You suspect your professor is deliberately talking over your head to put you down.
  • You suspect your friends are trying to make you believe they are much smarter than you are.
  • You suspect your friends are smarter than you are.

There are two possibilities:

  • They are not trying to intimidate you (most common).
  • They are deliberately setting out to intimidate you with their arcane knowledge so you will know what a worm you are. (There are people like that.)

Another possibility, which can overlap with the two above, is:

  • You expect to be intimidated. You may be what might be called a co-intimidator, Similar to the way someone who is codependent wants some other person to be dependent on them. (This is not like the “co” in category theory: “product” and “coproduct” have a symmetric relationship with each other, but the co-intimidator relation is asymmetric.)

There are many ways to get around being intimidated.

  • Ask “What the heck is a manifold?”
  • (In a lecture where it might be imprudent or impractical to ask) Write down what they say, then later ask a friend or look it up.
  • Most teachers like to be asked to explain something. Yes, I know some professors repeatedly put down people. Change sections! If you can’t, live with it! Not knowing something says nothing bad about you.

And remember:


If you don’t know something
probably many other students don’t know it either.

Send to Kindle

Learning by osmosis

In the Handbook, I said:

The osmosis theory of teaching is this attitude: We should not have to teach students to understand the way mathematics is written, or the finer points of logic (for example how quantifiers are negated). They should be able to figure these things on their own —“learn it by osmosis”. If they cannot do that they are not qualified to major in mathematics.

We learned our native language(s) as children by osmosis.  That does not imply that college students can or should learn mathematical reasoning that way. It does not even mean that college students should learn a foreign language that way.

I have been meaning to write a section of Understanding Mathematics that describes the osmosis theory and gives lots of examples.  There are already three links from other places in abstractmath.org that point to it.  Too bad it doesn’t exist…

Lately I have been teaching the Gauss-Jordan method using elementary row operations and found a good example.   The textbook uses the notation [m] +a[n] to mean “add a times row n to row m”.  In particular, [m] +[n] means “add row n to row m”, not “add row m to row n”. So in this notation ” [m] +[n] ” is not an expression, but a command, and in that command the plus sign is not commutative.   Similarly, “3[2]” (for example) does not mean “3 times row 2”, it means “change row 2 to 3 times row 2”.

The explanation is given in parentheses in the middle of an example:

…we add three times the first equation to the second equation.  (Abbreviation: [2] + 3[1].  The [2] means we are changing equation [2].  The expression [2] + 3[1] means that we are replacing equation 2 by the original equation plus three times equation 1.)

This explanation, in my opinion, would be incomprehensible to many students, who would understand the meaning only once it was demonstrated at the board using a couple of examples.  The phrase “The [2] means we are changing equation [2]” should have said something like “the left number, [2] in this case, denotes the equation we are changing.”  The last sentence refers to “the original equation”, meaning equation [2].  How many readers would guess that is what they mean?

In any case, better notation would be something like “[2]  3[1]”. I have found several websites that use this notation, sometimes written in the opposite direction. It is familiar to computer science students, which most of the students in my classes are.

Putting the definition of the notation in a parenthetical remark is also undesirable.  It should be in a separate paragraph marked “Notation”.

There is another point here:  No verbal definition of this notation, however well written, can be understood as well as seeing it carried out in an example.  This is also true of matrix multiplication, whose definition in terms of symbols such as a_ib_j is difficult to understand (if a student can figure out how you do it from this definition they should be encouraged to be a math major), whereas the process becomes immediately clear when you see someone pointing with one hand at successive entries in a row of one matrix while pointing with the other hand at successive entries in the other matrix’s columns.  This is an example of the superiority (in many cases) of pattern recognition over definitions in terms of strings of symbols to be interpreted.  I did write about pattern recognition, here.

Send to Kindle