Friday, December 5, 2014

Dividing vectors is possible

I was strolling through the neighborhood physics department recently, and I came upon an admonition on a bulletin board. Do not divide vectors the posting said, somewhat sternly. If A and B are vectors, than A/B is undefined.

Unfortunately this is not quite correct. To be fair, the context of the posting is the algebra one encounters in undergraduate physics courses. In the vanilla vector spaces in introductory mechanics or in a first course in linear algebra, e.g., vector division is verboten. But math is a mature and a rich field, and many very smart people have been investigating vector spaces and abstract algebras for more than a century. Some humility is always in order when thinking about absolute statements in algebra.

In a vector space over the field of real numbers R, it is possible to define an algebra in which a given vector has a multiplicative inverse. It's called geometric algebra, which is a kind of Clifford algebra. Dividing one vector by another is a resultant quantity called a quaternion. Quaternions were invented by William Rowan Hamilton in 1843. There's an introduction to geometric algebra book one can download for free. There is at least one physics book that uses geometric algebra, so this is not just mathematical abstraction.

The axioms of geometric algebra are quite simple:
[I apologize for the ugly indentation here. Why isn't LaTeX supported by blogger?]

These axioms lead directly to new quantities, imaginary unit vectors that are analogous to the square root of -1 that is introduced when extending the real numbers to complex numbers. So, to summarize, if we're strictly limited to a vector space in R3, then yes, vector division is not allowed. But it is possible to extend your vector space and introduce new quantities that do allow vector division, where dividing by a vector is defined as multiplying by its inverse. For further details, see this page in the book by Hestenes.

Wednesday, July 9, 2014

Password Generation with R

Submitted for your amusement. This script will generate ten passwords (N) of length 25. These are strong passwords. The program draws from numerals 0-9 and upper/lower case letters of the alphabet. Tune the parameters to your liking.

#!/usr/bin/Rscript --no-restore --quiet
N = 10
for (n in 1:N) {
  pw = sample(choices,length,replace=TRUE)

This is a sample output. Don't use these passwords posted here, generate your own with your own copy of R. It only makes sense to use passwords like this if you're using a password manager such as LastPass or 1Password. You are using a password manager, right?


Tuesday, June 10, 2014


Alfred Wegener is one of my heroes. He first postulated the theory of continental drift, now known as plate tectonics. For this he was ridiculed, scorned, and abused during his lifetime, which ended tragically. He never relented, however. The wikipedia article does not give precise dates, but it took until the 1960s before the theory of continental drift was widely accepted. Someone remarked once that all the old scientists who were opposed to the new, correct theory had to die off before it could be accepted. That's how science progresses sometimes, by the death of the intolerant.

Here's the "Gedenktafel" (commemorative or memorial plaque) on the wall of the gymnasium (think high school if you're American) he attended in Berlin. Gotta love "Kontinentalverschiebungstheorie" for continental drift theory. An mp3 of the pronunciation is at

"The polar researcher Prof. Dr. Alfred Wegener b. 1880 in Berlin, d. 1930 in the midst of the Greenland ice sheet. He was a student of the former Cologne Gymnasium, earned his PhD in 1905 from the University of Berlin, and in 1912 laid the groundwork for the modern theory of continental drift."

As one can read in the wikipedia article linked to above, Wegener perished on the ice in Greenland in late 1930. One can only imagine how brutal the weather conditions must have been. His body was buried with care by a 23-yr old name Rasmus Villumsen, who marked the site with a pair of skis that Wegener had used. Villumsen continued on and is presumed to have perished. His body was never found.

Monday, June 9, 2014

Why college tuition has outstripped inflation, in one graph

The American Association of University Professors has published an interesting graph [pdf]. I would embed it here, but that's not easy with blogger, since it's a pdf. The graph shows the percentage change in the number of employees in higher education institutions, by category of employee, from 75-76 to 2011. The graph is figure 1 in their annual salary report.

To get to the point, it's the administrators. The "Full-time Nonfaculty Professional" category has increased by 369% in the last 35 years. During the same time period, faculty positions have increased a measly 23%. There are now 3.7 times as many administrators bloating the payrolls of our universities as there were 30-some years ago. So that's why college tuition has grown by about 1200% in three decades. We're paying twelve times as much for tuition to finance a bunch of bullshit jobs.

It doesn't have to be like this. As Rebecca Schuman has noted in a post, there is one (one!) university in the USA that has been hiring more faculty and getting rid of bloated salaries on the administration payroll. That school is Iowa State University. What is their secret? ISU provides an existence proof that sanity can be restored. This one school is increasing faculty, while others are eliminating majors.

How do we fix this problem? I suppose the state legislators could do it. They approve the university budgets, right? The professors could go on strike. Eventually, this bubble will burst. This is some kind of deep irony, or a very cruel joke on college students, who are graduating in droves with debt that will take decades to pay off and lousy job prospects.

The TL;DR on this topic is Thomas Frank's post at

Thursday, May 1, 2014

Grading Software fooled by BABEL

BABEL, the Basic Automatic B.S. Essay Language generator, is software created by Les Perelman and others [] at MIT. Perelman was a "Director of Undergraduate Writing" at MIT. He has used BABEL to generate nonsense essays and feed them to automated essay grading software. The BABEL output gets high marks with sentences like "Privateness has not been and undoubtedly never will be lauded, precarious, and decent." I think Perelman has a point here. Clever students will no doubt learn to game any such grading system to their benefit. Teachers must question what, if any, benefit an automated essay grading system has.

Back in 2005, Perelman discovered an excellent predictor of score [] on an SAT essay test. It was the length of the essay. No other variable he examined correlated nearly as well with the score. The top scoring essays had many factual errors, too. No matter, according to SAT. The writing quality depends not on the correctness of any facts, according to SAT. Perelman's advice for scoring well is to practice writing fast and make up facts. Perhaps the high scorers can land a job with Fox News?

A paper by Perelman in the Journal of Writing Assessment critiques automatic scoring of essays.