Introduction
This appendix introduces some aspects of linear algebra and complex
algebra that will be helpful for the course. In addition, Dirac
notation is introduced and explained.
Vectors
Here we introduce vectors and the notation that we use for vectors. We then give some facts about real vectors before discussing the complex vectors used in quantum mechanics.
Vectors Defining and Representing
You may have heard of the definition of a vector as a quantity with both magnitude and direction. While this is true and often used in science classes, our purpose is different. So we will simply define a vector as an array of numbers that is written in a single row or a single column. When the vector is written as a row of numbers, it is called a row vector and when it is written in a column of numbers, it is called a column vector. As we will see, these two can have the same set of numbers, but each can be used in a slightly different way.
Examples of Vectors
This is an example of a row vector
This is an example of a column vector
Real Vectors
If you are familiar with vectors, the simple definition of a vector --- an object that has magnitude and direction --- is helpful to keep in mind even when dealing with complex vectors (vectors with complex, i.e., imaginary numbers as entries) as we will here. However, this is not necessary and we will see how to perform all of the operations that we need just using arrays of numbers that we call vectors. In three dimensional space, a vector is often written as
where the hat () denotes a unit vector and the components
, are just numbers. The unit vectors are also
known as basis vectors.
This is because any vector
in real three-dimensional space can be written in terms of these unit/basis vectors. In this vector, one can associate a point where the coordinate of the point is . That is, a point a distance from the origin along the -axis, a distance from the origin along the -axis, and a distance from the origin along the -axis. In
some sense, unit vectors are the basic components of any vector. Other basis
vectors could be used. But this will be discussed elsewhere.
The Magnitude or Length of a Vector
Vectors can be associated with a point in a space. The vector can then be represented as a line from the origin to the point. Each point can be associated with exactly one vector. The distance from the origin to the point is called the magnitude or length of the vector. For example, if we take the vector the magnitude, or length, represented by can be calculated as
Vector Operations
To illustrate vector operations, let
Vector Addition
Vectors can be added. To do this, each element of one vector is added to the corresponding element of the other vector. In general, for a row vector, they add as
The addition of row vectors is similar. They are added component by component. Suppose we had
Then
Since the way vectors are added is component to corresponding component, it doesn't make any sense to add a column vector and a row vector. It also doesn't make any sense to add a vector with two components to one with three components.
Example
Adding two vectors and with
we get
Multiplication by a Number
When a vector is multiplied by a number, each component is multiplied by that same number. For example, suppose
Then
Notice that if is positive, then the magnitude of the vector is
So multiplying a vector by a number just changes the length, or magnitude, of the vector is is positive. If is negative, it changes the directions of the components and therefore of the vector itself and also changes the magnitude.
Products of Two Vectors
Inner Products
The inner product, or dot product, for two real three-dimensional vectors,
can be computed as follows:
For the inner product of with itself, we get the square of
the magnitude of , denoted :
If we want a unit vector in the direction of , we can simply divide it
by its magnitude:
Now, of course, , which can easily be checked.
There are several ways to represent a vector. The ones we will use
most often are column and row vector notations. So, for example, we
could write the vector above as
In this case, our unit vectors are represented by the following:
We next turn to the subject of complex vectors and the relevant
notation.
We will see how to compute the inner product later, since some other
definitions are required.
Complex Vectors
A complex vector is a vector that has complex entries in each spot in the array. Above, the real vectors had real numbers in the array. Below, (for example the next equation), the vector components are complex numbers. In other words, can be written as .
For complex vectors in quantum mechanics, Dirac notation is used most often. This notation uses a ,
called a ket, for a vector. So our vector would be
For qubits, i.e. two-state quantum systems, complex vectors will often be used:
|
|
|
(C.1)
|
where
are the basis vectors. The two numbers and
are complex numbers, so the vector is said to
be a complex vector.
Matrices
Basic Definition and Representations
A matrix is an array of numbers of the following form with columns, col. 1, col. 2, etc., and rows, row 1, row 2, etc. The entries for the matrix are labeled by the row and column. So the entry of a matrix will be where is the row and is the column where the number is found. This is how it looks:
Notice that we represent the whole matrix with a capital letter . We could also represent it using all of the entries, this array of numbers seen in the equation above. Another way to represent it is to write it as . By this we mean that it is the array of numbers in the parentheses.
Matrix Addition
Matrix addition is performed by adding each element of one matrix with the corresponding element in another matrix. Let our two matrices be as above, and . To represent these in an array,
The the sum, which we could call is given by
In other words, the sum gives , etc. We add them component by component like we do vectors.
Notation
There are many aspects of linear algebra that are quite useful in
quantum mechanics. We will briefly discuss several of these aspects here.
First, some definitions and properties are provided that will
be useful. Some familiarity with matrices
will be assumed, although many basic definitions are also included.
Let us denote some matrix by . The set of all matrices with real entries is . Such matrices
are said to be real since they have all real entries. Similarly, the
set of complex matrices is . For the
set of square complex matrices, we simply write
.
We will also refer to the set of matrix elements, , where the
first index ( in this case) labels the row and the second
labels the column. Thus the element is the element in the
second row and third column. A comma is inserted if there is some
ambiguity. For example, in a large matrix the element in the
2nd row and 12th
column is written as to distinguish between the
21st row and 2nd column.
The Identity Matrix
An identity matrix has the property that when it is multiplied by any matrix, that matrix is unchanged. That is, for any matrix ,
Such an identity matrix always has ones along the diagonal and zeroes everywhere else. For example, the identity matrix is
It is straight-forward to verify that any matrix is not changed when multiplied by the identity matrix.
Complex Conjugate
The complex conjugate of a matrix
is the matrix with each element replaced by its complex conjugate. In
other words, to take the complex conjugate of a matrix, one takes the
complex conjugate of each entry in the matrix. We denote the complex
conjugate with a star, like this: . For example,
|
|
|
(C.2)
|
(Notice that the notation for a matrix is a capital letter, whereas
the entries are represented by lower case
letters.)
Transpose
The transpose of a matrix is the same set of
elements, but now the first row becomes the first column, the second row
becomes the second column, and so on. Thus the rows and columns are
interchanged. For example, for a square matrix, the
transpose is given by
|
|
|
(C.3)
|
Hermitian Conjugate
The complex conjugate and transpose of a matrix is called the Hermitian conjugate, or simply the dagger of a matrix. It is called the dagger because the symbol used to denote it,
():
|
|
|
(C.4)
|
For our example,
If a matrix is its own Hermitian conjugate, i.e. , then
we call it a Hermitian matrix.
(Clearly this is only possible for square matrices.) Hermitian
matrices are very important in quantum mechanics since their
eigenvalues are real. (See Sec.(Eigenvalues and Eigenvectors).)
The Inverse of a Matrix
Index Notation
Very often we write the product of two matrices and simply as
and let . However, it is also quite useful to write this
in component form. In this case, if these are matrices, the component form will be
This says that the element in the row and
column of the matrix is the sum . The transpose of has elements
Now if we were to transpose and as well, this would read
This gives us a way of seeing the general rule that
It follows that
The Trace
The trace of a matrix is the sum of the diagonal
elements and is denoted . So for example, the trace of an
matrix is
.
Some useful properties of the trace are the following:
- .
Using the first of these results,
This relation is used so often that we state it here explicitly.
The Determinant
For a square matrix, the determinant is quite a useful thing. For
example, an matrix is invertible if and only if its
determinant is not zero. So let us define the determinant and give
some properties and examples.
The determinant of a matrix,
|
|
|
(C.5)
|
is given by
|
|
|
(C.6)
|
Higher-order determinants can be written in terms of smaller ones in a recursive way. For example, let
Then
The determinant of a matrix can be
also be written in terms of its components as
|
|
|
(C.7)
|
where the symbol
|
|
|
(C.8)
|
Let us consider the example of the matrix given
above. The determinant can be calculated by
where, explicitly,
|
|
|
(C.9)
|
so that
|
|
|
(C.10)
|
Now given the values of in Eq. C.9,
this is
The determinant has several properties that are useful to know. A few are listed here:
- The determinant of the transpose of a matrix is the same as the determinant of the matrix itself:
- The determinant of a product is the product of determinants:
From this last property, another specific property can be derived.
If we take the determinant of the product of a matrix and its
inverse, we find
since the determinant of the identity is one. This implies that
The Inverse of a Matrix
The inverse of a square matrix is another matrix,
denoted , such that
where is the identity matrix consisting of zeroes everywhere
except the diagonal, which has ones. For example, the
identity matrix is
It is important to note that a matrix is invertible if and only if its determinant is nonzero. Thus one only needs to calculate the
determinant to see if a matrix has an inverse or not.
Hermitian Matrices
Hermitian matrices are important for a variety of reasons; primarily, it is because their eigenvalues are real. Thus Hermitian matrices are used to represent density operators and density matrices, as well as Hamiltonians. The density operator is a positive semi-definite Hermitian matrix (it has no negative eigenvalues) that has its trace equal to one. In any case, it is often desirable to represent Hermitian matrices using a real linear combination of a complete set of Hermitian matrices. A set of Hermitian matrices is complete if any Hermitian matrix can be represented in terms of the set. Let be a complete set. Then any Hermitian matrix can be represented by . The set can always be taken to be a set of traceless Hermitian matrices and the identity matrix. This is convenient for the density matrix (its trace is one) because the identity part of an Hermitian matrix is if we take all others in the set to be traceless. For the Hamiltonian, the set consists of a traceless part and an identity part where identity part just gives an overall phase which can often be neglected.
One example of such a set which is extremely useful is the set of Pauli matrices. These are discussed in detail in Chapter 2 and in particular in Section 2.4.
Unitary Matrices
A unitary matrix is one whose
inverse is also its Hermitian conjugate, , so that
If the unitary matrix also has determinant one, it is said to be a special unitary matrix. The set of
unitary matrices is denoted
and the set of special unitary matrices is denoted .
Unitary matrices are particularly important in quantum mechanics
because they describe the evolution of quantum states.
They have this ability due to the fact that the rows and columns of unitary matrices (viewed as vectors) are orthonormal. (This is made clear in an example below.) This means that when
they act on a basis vector of the form
|
|
|
(C.11)
|
with a single 1, in say the th spot, and zeroes everywhere else, the result is a normalized complex vector. Acting on a set of
orthonormal vectors of the form given in Eq.(C.11)
will produce another orthonormal set.
Let us consider the example of a unitary matrix,
|
|
|
(C.12)
|
The inverse of this matrix is the Hermitian conjugate,
|
|
|
(C.13)
|
provided that the matrix satisfies the constraints
|
|
|
(C.14)
|
and
|
|
|
(C.15)
|
Looking at each row as a vector, the constraints in
Eq.(C.14) are the orthonormality conditions for the
vectors forming the rows. Similarly, the constraints in
Eq.(C.15) are the orthonormality conditions for the
vectors forming the columns.
Inner and Outer Products
Now that we have a definition for the Hermitian conjugate, we consider the
case for a matrix, i.e. a vector. In Dirac notation, this is
The Hermitian conjugate comes up so often that we use the following
notation for vectors:
This is a row vector and in Dirac notation is denoted by the symbol , which is called a bra. Let us consider a second complex vector,
The inner product between and
is computed as follows:
|
|
|
(C.16)
|
The outer product between these same two vectors is
More Dirac Notation
If these two vectors are orthogonal,
then their inner product is zero, or . (The
is called a bracket, which is the product of the bra and the ket.) The inner product of with itself is
This vector is considered normalized when .
More generally, we will consider vectors in dimensions. In this
case we write the vector in terms of a set of basis vectors,
, where . This is an ordered set of
vectors which are labeled simply by integers. If the set is orthogonal,
then
If they are normalized, then
If both of these are true, i.e. the entire set is orthonormal, we can
write
where the symbol is called the Kronecker delta and is defined by
|
|
|
(C.17)
|
Now consider -dimensional vectors by letting two such vectors
be expressed in the same basis as
and
Then the inner product is
|
|
|
(C.18)
|
where the fact that the delta function is zero unless
is used to obtain the last equality. Taking the inner product of a vector
with itself will get
This immediately gives us a very important property of the inner
product. It tells us that, in general,
(The symbol means "if and only if," sometimes written as "iff.")
We could also expand a vector in a different basis. Let us suppose
that the set is an orthonormal basis that is different from the one considered earlier. We
could expand our vector in terms of our new basis by
expanding our new basis in terms of our old basis. Let us first
expand the in terms of the :
|
|
|
(C.19)
|
so that
|
|
|
(C.20)
|
where
|
|
|
(C.21)
|
Notice that the insertion of didn't do anything to our original vector; it is the same vector, just in a
different basis. Therefore, this is effectively the identity operator,
This is an important and quite useful relation.
To interpret Eq.(C.19), we can draw a close
analogy with three-dimensional real vectors. The inner product
can be interpreted as the projection of one vector onto
another. This provides the part of along .
Transformations
Suppose we have two different orthogonal bases, , .
The numbers for all the different and are
often referred to as matrix elements since the set forms a matrix, with
labelling the rows and labelling the columns. Thus we
can represent the transformation from one basis to another with a matrix
transformation. Let be the matrix with elements . The transformation from one basis to another,
written in terms of the coefficients of , is
|
|
|
(C.22)
|
where
This sort of transformation is a change of basis. Oftentimes when one vector is transformed to another the transformation can be viewed as a transformation of the components of the vector and is also represented by a matrix. Thus transformations can either be
represented by the matrix equation, like Eq.(C.22), or the components,
|
|
|
(C.23)
|
In the case that we consider a matrix transformation of basis elements, we call it a passive transformation. (The transformation does nothing to the object, but only changes the basis in which the object is described.) An active transformation is one where the object itself is transformed. Often these two transformations, active and passive, are very simply related. However, the distinction can be very important.
For a general transformation matrix acting on a vector,
the matrix elements in a particular basis are
just as elements of a vector can be found using
Transformations of a Qubit
It is worth belaboring the point somewhat and presenting several ways in which to parametrize the set of transformations of a qubit. A qubit state is represented by a complex two-dimensional vector that has been normalized to one:
The most general matrix transformation that will take this to any other state of the same form (complex, 2-d vector with unit norm) is a unitary matrix. In Chapter 2, several specific examples of qubit transformations were given; in Chapter 3, Section 3.4 it was stated that an element of SU(2) can be written as (see Section 3.2.1, Exponentiation of a Matrix, in particular Eq. (3.8))
|
|
|
(C.24)
|
where is a unit vector, , and .
Explicitly, this is
Let us prove this. First, using Eq. (3.7), we will need to find , i.e., all powers of . This turns out to be fairly easy. First note that since is a unit vector. Then note that
. (See Eq. (2.21) as well as Eqs. (C.17) and (C.8).) These imply that (recalling that ),
To get the third line, one just uses Eq. (2.21). To see that is zero, note that is symmetric in but is antisymmetric in . Another way to see this more explicitly is to write out the sum and notice that each term shows up with a + and - sign thus cancelling each other out. Therefore, all the even powers of are just equal to the identity matrix and all odd powers are just times the even parts. Thus the sum in Eq. (3.7) reduces to
Notice that this is a special unitary matrix. (See Section Unitary Matrices.)
To see that this is the most general SU(2) matrix, one needs to verify that any complex unitary matrix can be written in this form. (One way to do this is to start with a generic matrix and impose the restrictions. Here one may simply convince oneself that this is general through observation by acting on basis vectors.) This is the most general qubit transformation and can be interpreted as a rotation about the axis by an angle .
Another parametrization of this set of matrices is the following, called the Euler angle parametrization:
|
|
|
(C.25)
|
In this case the matrices and are not unique. Any two of the three Pauli matrices (or one of each) may be chosen. This is quite simple, useful, and generalizable to SU(N) for N arbitrary. In the simple case of a qubit, one may convince oneself by acting on basis vectors as before. However, with a little thought, one may see that rotating to a position on the sphere by the first angle, followed by rotations using the other two, will provide for a general orientation of an object.
Similarity Transformation
A similarity transformation
of an matrix by an invertible matrix is .
There are (at least) two important things to note about similarity
transformations:
- Similarity transformations leave the trace of a matrix unchanged. This is shown explicitly in Section 3.5.
- Similarity transformations leave the determinant of a matrix unchanged, or invariant. This is because
- Simultaneous similarity transformations of matrices in an equation will leave the equation unchanged. Let , , and . If , then , since . The two matrices and are said to be similar.
Polar Decomposition and Singular Value Decomposition
A decomposition of a matrix that is often useful is the polar decomposition. For any matrix, , there exists a unitary matrix and postive matrices
and such that
|
|
|
(C.26)
|
where the postive operators and are and . Futhermore, if is invertible, then is unique.
A matrix can always be diagonalized. By this, it is meant that for
every complex matrix there is a diagonal matrix such that
|
|
|
(C.27)
|
where and are unitary matrices. This form is called a singular value decomposition of the matrix and the entries of the diagonal matrix are called the singular values
of the matrix . However, the singular values are not always easy to find.
For proofs, see NielsenChuang:book.
Eigenvalues and Eigenvectors
Diagonalization
For the special case that the matrix is Hermitian ,
the matrix can be written as
|
|
|
(C.28)
|
where is unitary . In this case the elements
of the matrix are called eigenvalues.
Very often eigenvalues are introduced as solutions to the equation
where is an eigenvector.
To find the eigenvalues and eigenvectors of a matrix , we follow a
standard procedure which is to calculate
|
|
|
(C.29)
|
and then solve for . The different solutions for is the
set of eigenvalues and is called the spectrum. Let the different eigenvalues be denoted by , fo an vector. If two
eigenvalues are equal, we say the spectrum is
degenerate. To find the
eigenvectors, which correspond to different eigenvalues, the equation
must be solved for each value of . Notice that this equation
holds even if we multiply both sides by some complex number. This
implies that an eigenvector can always be scaled. Usually they are
normalized to obtain an orthonormal set. As we will see by example,
degenerate eigenvalues require some care.
Example 1
Consider a Hermitian matrix
|
|
|
(C.30)
|
To find the eigenvalues
of this, we follow a standard procedure, which
is to calculate
|
|
|
(C.31)
|
and solve for . The eigenvalues of this matrix are given by
which implies that the eigenvalues are
and the eigenvectors are
These expressions are useful for calculating properties of qubit
states as will be seen in the text.
Example 2
Now consider a matrix,
First we calculate
This implies that the eigenvalues C.6 are
Let , , and .
To find eigenvectors, we calculate
|
|
|
(C.32)
|
for each .
For , we get the following equations:
|
|
|
(C.33)
|
Solving this obtains , , and is any non-zero number (which will be chosen to normalize the vector). For ,
|
|
|
(C.34)
|
And finally, for , we obtain
|
|
|
(C.35)
|
so that .
Therefore, our three eigenvectors are
The matrix
is the matrix that diagonalizes in the following way:
where
We may write this as
This is sometimes called the eigenvalue decompostion of the matrix and can also be written as
|
|
|
(C.36)
|
Example 3
Next, consider the complex Hermitian matrix
First we calculate
This implies that the eigenvalues C.6 are
Note that there are two that are the same, or degenerate.
Let , , and .
To find eigenvectors, we calculate
|
|
|
(C.37)
|
for each .
For , we get the following equations:
|
|
|
(C.38)
|
so
|
|
|
(C.39)
|
Now for ,
|
|
|
(C.40)
|
so
|
|
|
(C.41)
|
We would like to have a set of orthonormal vectors. (We can always choose the set to be orthonormal.) We choose the three eigenvectors to be
We set the inner product of the two vectors and equal to zero so as to have then be orthogonal:
Now we can choose and so that the normalized eigenvectors are
Tensor Products
The tensor product,
or the Kronecker product,
is used extensively in quantum mechanics and
throughout the course. It is commonly denoted with a
symbol, although this is often left out. In fact, the following
are commonly found in the literature as notation for the tensor
product of two vectors and :
|
|
|
(C.42)
|
Each of these has its advantages and will all be used in
different circumstances in this text.
The tensor product is also often used for operators. Several
examples
will be given, one that explicitly calculates the tensor product for
two vectors and one that calculates it for two matrices which could
represent operators. However, these are not different in the sense
that a vector is a or an matrix. It is also
noteworthy that the two objects in the tensor product need not be of
the same type. In general, a tensor product of an object
(array) with a object will produce an
object.
The tensor product of two objects is computed as follows.
Let be an and be a array,
|
|
|
(C.43)
|
and similarly for . Then
|
|
|
(C.44)
|
Let us now consider two examples. First let and
be as before,
Then
|
|
|
(C.45)
|
Also
|
|
|
(C.46)
|
Now consider two matrices
Then
|
|
|
(C.47)
|
Properties of Tensor Products
Listed here are properties of tensor products that are useful, with , , , of any type:
- If is an matrix, and is an matrix, then .
(See Horn and Johnson, Topics in Matrix Analysis [10], Chapter 4.)
Exercises
- Vectors
- About the author
- Foreword to the first edition
- Foreword to the second edition
- Matrices
- About the author
- Foreword to the first edition
- Foreword to the second edition
- Dirac Notation (bras and kets)
- About the author
- Foreword to the first edition
- Foreword to the second edition
- Transformations
- About the author
- Foreword to the first edition
- Foreword to the second edition
- Eigenvalues and Eigenvectors
- About the author
- Foreword to the first edition
- Foreword to the second edition
- Tensor Products
- About the author
- Foreword to the first edition
- Foreword to the second edition