Defining a matrix
Mathematicians define a matrix as simply a rectangular array that has m rows and n columns, like the one shown in the following screenshot:

Figure 2.2 – Model of a matrix with m rows and n columns
In math, matrices are written out a particular way. An example 4 × 5 matrix is shown in the following expression. Notice that it has four rows and five columns:

Figure 2.3 – Example of a 4 x 5 matrix
Notation
In math and quantum computing, matrix variable names are in capital letters, and each entry in a matrix is referred to by a lowercase letter that corresponds to the variable name with subscripts (aij). Subscript i refers to the row the entry is in and subscript j refers to the column it is in. The following formula shows this for a 3 × 3 matrix:
In our example matrix A, a22 = 1. What is a32? Hint—it's the only number that begins with the letter n.
Redefining vectors
One thing we will do in this book is iteratively define things so that we start simple, and as we learn more, we will add or even redefine objects to make them more advanced. So, in our previous chapter, our Euclidean vectors only had two dimensions. What if they have more? Well, we can represent them with n × 1 matrices, like so:
What do we call a 1 × n matrix such as the following one?
Well, we will call it a row vector. To distinguish between the two types, we will call the n × 1 matrix a column vector. Also, while we have been using kets (for example, |x⟩) to notate column vectors so far, we will use something different to notate row vectors. We will introduce the bra, which is the other side of the bra-ket notation. A bra is denoted by an opening angle bracket, the name of the vector, and a pipe or vertical bar. For example, a row vector with the name b would be denoted like this: ⟨b|. This is the other side of the bra-ket notation explained further in the appendix. To make things clearer, here are our definitions of a column vector and a row vector for now:
Important Note
A bra has a deeper definition that we will look at later in this book. For now, this is enough for us to tackle matrix multiplication.
Now that we have introduced how column and row vectors can be represented by one-dimensional (1D) matrices, let's next look at some operations we can do on matrices.