The backslash operator has come to represent both the matrix origins and the usability of MATLAB.



At the recent SIAM Annual Meeting in San Diego we offered T-shirts at the MathWorks booth that featured the iconic MATLAB statement

x = A\b;

They prompted a friend to ask me "When you were developing MATLAB, how did you come to choose the backslash character for the solution of linear equations." The answer takes us back to the beginnings because solving linear equations is certainly the first nontrivial operation MATLAB had to be able to do.

Father of ASCII

Robert W. (Bob) Bemer was an early computer pioneer at Rand Corporation and at IBM who was a prominent participant in industry standards committees. Among his many accomplishments, he was one of the first people to propose an approach to the Y2K problem. His 1960 design of the character set for the IBM STRETCH computer included the backslash, as well as curly braces and square brackets. He later added the escape character.

Bemer was an advocate of the backslash character because it could be combined with the forward slash to form the logic operators /\ and \/, which were part of the ALGOL 60 programming language. In the early 1960s, Bemer was instrumental in having backslash, as well as the braces, brackets, and escape, included in the American Standard Code for Information Interchange character set. That's ASCII for short and is, of course, is the character set that all computers use today.

When Bemer proposed backslash to the ASCII committee, there was not immediate acceptance. But he says, "So I asked for a character more important to have. After much discussion they could not agree on a better candidate."


It took more than a decade for the ASCII character set to be universally adopted. In the mid to late 1970s we still had to deal with computers and computer terminals that had different character sets. Many central main frames had operating systems with 6-bit character sets and so could not handle both upper and lower case. Different machines had different sets of special characters.

The IBM main frames at Argonne National Laboratory, where we were working on EISPACK and LINPACK, initially had a 6-bit, upper case only character set called BCD, for Binary Coded Decimal. New machines brought with them 8-bit EBCDIC, which had upper and lower case and was a kind of transition from BCD to ASCII. Other big machines from other manufacturers, at other national laboratories and at university computer centers, had other operating systems and other character sets. It was a veritable zoo.

Choosing backslash

But, perhaps surprisingly, all these systems happened to have one thing in common -- they all included backslash among their collection of special characters. Thinking about it now as I write this blog, I can only surmise that it was because of Bob Bemer and in anticipation of the emerging ASCII standard.

Since matrix multiplication is not commutative, solving the linear system $Ax = b$ is not the same thing as solving $xA = b$. I needed two different symbols for the two different solution operations. You can think of the process as like dividing by $A$, so it was just natural to choose the backward slash and the forward slash for the two symbols. This gives us the two different MATLAB statements

x = A\b;

x = b/A;

The first of these is by far the more important.

Kurt Hensel, 1928

Nick Higham somehow found a paper written in 1928 by a famous German mathematician, Kurt Hensel, "Uber den Zusammenhang zwischen den Systemen und ihren Determinanten". Hensel introduces the backslash notation for the solution of a system of simultaneous linear equations in the same way we have, in fact with the same letters, $A$, $X$, and $B$. He then uses the notation once on the fourth page of the paper and never again. As the title indicates, most of the paper is about determinants.

As far as we know, no one else used backslash in this way until I did fifty years later.

19th Century notation

Nick also describes notation devised in the 19th century, before matrices were called matrices. Nick found that Arthur Cayley suggested

$$ \frac{B |}{| A} \ \ \mbox{and} \ \ \frac{| B}{A |} $$

for $BA^{-1}$ and $A^{-1}B$ in the context of groups. Fortunately, this notation did not catch on.


Thanks to Nick Higham for help with this week's post.

Further Reading

R. M. Bemer, "How ASCII Got Its Backslash"

K. Hensel, "Uber den Zusammenhang zwischen den Systemen und ihren Determinanten", Journal fur die reine und angewandte Mathematik (Crelle's Journal). 1928, volume 159, Pages 246-254. <>

N. J. Higham, "Cayley, Sylvester, and early matrix theory", Linear Algebra Appl., 428:39-43, 2008. <>

Published with MATLAB® R2013b

  • print
  • send email


To leave a comment, please click here to sign in to your MathWorks Account or create a new one.