# Parenthesis vs brackets for matrices

When I first learned linear algebra, both the professor and the book used brackets like [ and ] to enclose matrices. However, in my current differential equations textbook, matrices are enclosed by parenthesis, and I suddenly realize everybody else are using them too.

So are brackets/parenthesis for enclosing matrices always totally interchangeable?

It is just a question of notation and what you are comfortable with. The only thing you might want to be aware is |A| stands for determinant of the matrix A and hence cannot be used in place of () or [] to represent the matrix

They're interchangeable. I think a lot of people tend to use parentheses just because they're easier to write by hand.

• @Michale Lugo: and less easy to confuse with vertical bars, which denote determinants (at least to me)... Commented Nov 10, 2010 at 5:09
• I actually used to hate parentheses for matrices for some reason; it always seemed "less rigorous." Then I had to TA for linear algebra... It is much easier to slap some parentheses on the board than brackets =)
– Bey
Commented Nov 10, 2010 at 6:03
• Bey, I'm teaching game theory this semester. Lots of matrices. You bet I'm using parentheses. (And I even use parentheses in things I write up in LaTeX, like solutions to the homework, just for consistency.) Commented Nov 10, 2010 at 16:02

There are two notations for matrices, ( ), [ ]. Use the one with which you are comfortable with.
Below are examples of both for the 3x3 Identity matrix. $$\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} \\ \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$$

This is a common questions that I've been asked time to time. Whether or not you choose to use:

$$\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$$

or

$$\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$$

is up to you.

The difference between the notations is that the parenthesis notation $$\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$$

is mostly used by mathematicians.

However, the square bracket notation $$\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$$ is mostly used by engineers or physicists (i.e. all other science disciplines other than mathematics). This is analogous to the reason why the spherical coordinate system used by physicists and engineers have the two angles labelled the other way, compared to that used by mathematicians. As a mathematician, I tend to stick with using the parenthesis notation.

Having said that, it is worth noting that | | notations denotes its determinant, not a matrix itself.

In general, if you want to write a matrix, use square brackets [] or parentheses (). Personally I tend to use the square brackets to denote that the matrix is of linear nature, the parentheses for nonlinear matrices.

So, as an example, when doing a linearisation of the nonlinear matrix B around $$x = [0,0]^T$$, I would write it like this: $$$$B = \begin{pmatrix} x_2 \\ -x_2 - \frac{g}{l}\sin(x_1) \end{pmatrix} \Rightarrow B^* = \begin{bmatrix} 0 & 1 \\ -\frac{g}{l} & -1 \end{bmatrix}$$$$

As already mentioned by others, what matters most is that you do NOT use the absolute bars to denote a matrix. So NOT like this:

$$$$A = \begin{vmatrix} a & b \\ c & d \end{vmatrix}$$$$

The vertical lines represent the determinant. (Although a lot of people will write $$det(A)$$ instead.)