Skip to main content

Section MO Matrix Operations

In this section we will back up and start simple. We begin with a definition of a totally general set of matrices, and see where that takes us.

Subsection MEASM Matrix Equality, Addition, Scalar Multiplication

Definition VSM. Vector Space of \(m\times n\) Matrices.

The vector space \(M_{mn}\) is the set of all \(m\times n\) matrices with entries from the set of complex numbers.

Just as we made, and used, a careful definition of equality for column vectors, so too, we have precise definitions for matrices.

Definition ME. Matrix Equality.

The \(m\times n\) matrices \(A\) and \(B\) are equal, written \(A=B\) provided \(\matrixentry{A}{ij}=\matrixentry{B}{ij}\) for all \(1\leq i\leq m\text{,}\) \(1\leq j\leq n\text{.}\)

So equality of matrices translates to the equality of complex numbers, on an entry-by-entry basis. Notice that we now have yet another definition that uses the symbol “=” for shorthand. Whenever a theorem has a conclusion saying two matrices are equal (think about your objects), we will consider appealing to this definition as a way of formulating the top-level structure of the proof.

We will now define two operations on the set \(M_{mn}\text{.}\) Again, we will overload a symbol (‘+’) and a convention (juxtaposition for scalar multiplication).

Definition MA. Matrix Addition.

Given the \(m\times n\) matrices \(A\) and \(B\text{,}\) define the sum of \(A\) and \(B\) as an \(m\times n\) matrix, written \(A+B\text{,}\) by \(\matrixentry{A+B}{ij}=\matrixentry{A}{ij}+\matrixentry{B}{ij}\text{,}\) for \(1\leq i\leq m,\,1\leq j\leq n\text{.}\)

So matrix addition takes two matrices of the same size and combines them (in a natural way!) to create a new matrix of the same size. Perhaps this is the “obvious” thing to do, but it does not relieve us from the obligation to state it carefully.

If

\begin{align*} A= \begin{bmatrix} 2&-3&4\\ 1&0&-7 \end{bmatrix} && B= \begin{bmatrix} 6&2&-4\\ 3&5&2 \end{bmatrix} \end{align*}

then

\begin{align*} A+B&= \begin{bmatrix} 2&-3&4\\ 1&0&-7 \end{bmatrix} + \begin{bmatrix} 6&2&-4\\ 3&5&2 \end{bmatrix}\\ &= \begin{bmatrix} 2+6&-3+2&4+(-4)\\ 1+3&0+5&-7+2 \end{bmatrix} =\begin{bmatrix} 8&-1&0\\ 4&5&-5 \end{bmatrix}\text{.} \end{align*}

Our second operation takes two objects of different types, specifically a number and a matrix, and combines them to create another matrix. As with vectors, in this context we call a number a scalar in order to emphasize that it is not a matrix.

Definition MSM. Matrix Scalar Multiplication.

Given the \(m\times n\) matrix \(A\) and the scalar \(\alpha\in\complexes\text{,}\) the scalar multiple of \(A\) is the \(m\times n\) matrix, written \(\alpha A\text{,}\) and defined by \(\matrixentry{\alpha A}{ij}=\alpha\matrixentry{A}{ij}\text{,}\) for \(1\leq i\leq m,\,1\leq j\leq n\text{.}\)

Notice again that we have yet another kind of multiplication, and it is again written putting two symbols side-by-side. Computationally, scalar matrix multiplication is very easy.

For the scalar \(\alpha=7\) and the matrix \(A\text{,}\)

\begin{align*} A&= \begin{bmatrix} 2&8\\ -3&5\\0&1 \end{bmatrix} & \alpha A&= 7\begin{bmatrix}2&8\\-3&5\\0&1\end{bmatrix} = \begin{bmatrix}7(2)&7(8)\\7(-3)&7(5)\\7(0)&7(1)\end{bmatrix} = \begin{bmatrix}14&56\\-21&35\\0&7\end{bmatrix}\text{.} \end{align*}

Sage defines our set \(M_{mn}\) as a “matrix space” with the command MatrixSpace(R, m, n) where R is a number system and m and n are the number of rows and number of columns, respectively. This object does not have much functionality defined in Sage. Its main purposes are to provide a parent for matrices, and to provide another way to create matrices. The two matrix operations just defined (addition and scalar multiplication) are implemented as you would expect. In the example below, we create two matrices in \(M_{23}\) from just a list of 6 entries, by coercing the list into a matrix by using the relevant matrix space as if it were a function. Then we can perform the basic operations of matrix addition (Definition MA) and matrix scalar multiplication (Definition MSM).

Coercion can make some interesting conveniences possible. Notice how the scalar 37 in the following expression is coerced to \(37\) times an identity matrix of the proper size.

This coercion only applies to sums with square matrices. You might try this again, but with a rectangular matrix, just to see what the error message says.

Subsection VSP Vector Space Properties

With definitions of matrix addition and scalar multiplication we can now state, and prove, several properties of each operation, and some properties that involve their interplay. We now collect ten of them here for later reference.

While some of these properties seem very obvious, they all require proof. However, the proofs are not very interesting, and border on tedious. We will prove one version of distributivity very carefully, and you can test your proof-building skills on some of the others. We will give our new notation for matrix entries a workout here. Compare the style of the proofs here with those given for vectors in Theorem VSPCV — while the objects here are more complicated, our notation makes the proofs cleaner.

To prove Property DSAM, \((\alpha+\beta)A=\alpha A+\beta A\text{,}\) we need to establish the equality of two matrices (see Proof Technique GS). Definition ME says we need to establish the equality of their entries, one-by-one. How do we do this, when we do not even know how many entries the two matrices might have? This is where the notation for matrix entries, given in Definition M, comes into play. Ready? Here we go.

For any \(i\) and \(j\text{,}\) \(1\leq i\leq m\text{,}\) \(1\leq j\leq n\text{,}\)

\begin{align*} \matrixentry{(\alpha+\beta)A}{ij}&=(\alpha+\beta)\matrixentry{A}{ij}&& \knowl{./knowl/definition-MSM.html}{\text{Definition MSM}}\\ &=\alpha\matrixentry{A}{ij}+\beta\matrixentry{A}{ij}&& \knowl{./knowl/property-DCN.html}{\text{Property DCN}}\\ &=\matrixentry{\alpha A}{ij}+\matrixentry{\beta A}{ij}&& \knowl{./knowl/definition-MSM.html}{\text{Definition MSM}}\\ &=\matrixentry{\alpha A+\beta A}{ij}&& \knowl{./knowl/definition-MA.html}{\text{Definition MA}}\text{.} \end{align*}

There are several things to notice here. (1) Each equals sign is an equality of scalars (numbers). (2) The two ends of the equation, being true for any \(i\) and \(j\text{,}\) allow us to conclude the equality of the matrices by Definition ME. (3) There are several plus signs, and several instances of juxtaposition. Identify each one, and state exactly what operation is being represented by each.

For now, note the similarities between Theorem VSPM about matrices and Theorem VSPCV about vectors.

The zero matrix described in this theorem, \(\zeromatrix\text{,}\) is what you would expect — a matrix full of zeros.

Definition ZM. Zero Matrix.

The \(m\times n\) zero matrix is written as \(\zeromatrix=\zeromatrix_{m\times n}\) and defined by \(\matrixentry{\zeromatrix}{ij}=0\text{,}\) for all \(1\leq i\leq m\text{,}\) \(1\leq j\leq n\text{.}\)

Subsection TSM Transposes and Symmetric Matrices

We describe one more common operation we can perform on matrices. Informally, to transpose a matrix is to build a new matrix by swapping its rows and columns.

Definition TM. Transpose of a Matrix.

Given an \(m\times n\) matrix \(A\text{,}\) its transpose is the \(n\times m\) matrix \(\transpose{A}\) given by \(\matrixentry{\transpose{A}}{ij}=\matrixentry{A}{ji}\text{,}\) for \(1\leq i\leq n,\,1\leq j\leq m\text{.}\)

We could formulate the transpose, entry-by-entry, using the definition. But it is easier to just systematically rewrite rows as columns (or vice-versa). The form of the definition given will be more useful in proofs. So for the \(3\times 4\) matrix \(D\) we have

\begin{align*} D&= \begin{bmatrix} 3&7&2&-3\\ -1&4&2&8\\ 0&3&-2&5 \end{bmatrix} & \transpose{D}&= \begin{bmatrix} 3&-1&0\\ 7&4&3\\ 2&2&-2\\ -3&8&5 \end{bmatrix}\text{.} \end{align*}

It will sometimes happen that a matrix is equal to its transpose. In this case, we will call a matrix symmetric. These matrices occur naturally in certain situations, and also have some nice properties, so it is worth stating the definition carefully. Informally a matrix is symmetric if we can “flip” it about the main diagonal (upper-left corner, running down to the lower-right corner) and have it look unchanged.

Definition SYM. Symmetric Matrix.

The matrix \(A\) is symmetric if \(A=\transpose{A}\text{.}\)

The matrix \(E\) below is symmetric.

\begin{equation*} E= \begin{bmatrix} 2&3&-9&5&7\\ 3&1&6&-2&-3\\ -9&6&0&-1&9\\ 5&-2&-1&4&-8\\ 7&-3&9&-8&-3 \end{bmatrix}\text{.} \end{equation*}

You might have noticed that Definition SYM did not specify the size of the matrix \(A\text{,}\) as has been our custom. That is because it was not necessary. An alternative would have been to state the definition just for square matrices, but this is the substance of the next proof.

Before reading the next proof, we want to offer you some advice about how to become more proficient at constructing proofs. Perhaps you can apply this advice to the next theorem. Have a peek at Proof Technique P now.

We start by specifying \(A\)'s size, without assuming it is square, since we are trying to prove that, so we cannot also assume it. Suppose \(A\) is an \(m\times n\) matrix. Because \(A\) is symmetric, we know by Definition SYM that \(A=\transpose{A}\text{.}\) So, in particular, Definition ME requires that \(A\) and \(\transpose{A}\) must have the same size. The size of \(\transpose{A}\) is \(n\times m\text{.}\) Because \(A\) has \(m\) rows and \(\transpose{A}\) has \(n\) rows, we conclude that \(m=n\text{,}\) and hence \(A\) must be square by Definition SQM.

We finish this section with three easy theorems, but they illustrate the interplay of our three new operations, our new notation, and the techniques used to prove matrix equalities.

The statement to be proved is an equality of matrices, so we work entry-by-entry and use Definition ME. Think carefully about the objects involved here, and the many uses of the plus sign. Realize too that while \(A\) and \(B\) are \(m\times n\) matrices, the conclusion is a statement about the equality of two \(n\times m\) matrices! So we begin with a preparation for Definition ME. For \(1\leq i\leq n\text{,}\) \(1\leq j\leq m\text{,}\)

\begin{align*} \matrixentry{\transpose{(A+B)}}{ij}&= \matrixentry{A+B}{ji}&& \knowl{./knowl/definition-TM.html}{\text{Definition TM}}\\ &=\matrixentry{A}{ji}+\matrixentry{B}{ji}&& \knowl{./knowl/definition-MA.html}{\text{Definition MA}}\\ &=\matrixentry{\transpose{A}}{ij}+\matrixentry{\transpose{B}}{ij}&& \knowl{./knowl/definition-TM.html}{\text{Definition TM}}\\ &=\matrixentry{\transpose{A}+\transpose{B}}{ij}&& \knowl{./knowl/definition-MA.html}{\text{Definition MA}}\text{.} \end{align*}

Since the matrices \(\transpose{(A+B)}\) and \(\transpose{A}+\transpose{B}\) agree at each entry, Definition ME tells us the two matrices are equal.

The statement to be proved is an equality of matrices, so we work entry-by-entry and use Definition ME. Notice that the desired equality is of \(n\times m\) matrices, and think carefully about the objects involved here, plus the many uses of juxtaposition. For \(1\leq i\leq m\text{,}\) \(1\leq j\leq n\text{,}\)

\begin{align*} \matrixentry{\transpose{(\alpha A)}}{ji}&= \matrixentry{\alpha A}{ij}&& \knowl{./knowl/definition-TM.html}{\text{Definition TM}}\\ &=\alpha\matrixentry{A}{ij}&& \knowl{./knowl/definition-MSM.html}{\text{Definition MSM}}\\ &=\alpha\matrixentry{\transpose{A}}{ji}&& \knowl{./knowl/definition-TM.html}{\text{Definition TM}}\\ &=\matrixentry{\alpha\transpose{A}}{ji}&& \knowl{./knowl/definition-MSM.html}{\text{Definition MSM}}\text{.} \end{align*}

Since the matrices \(\transpose{(\alpha A)}\) and \(\alpha\transpose{A}\) agree at each entry, Definition ME tells us the two matrices are equal.

We again want to prove an equality of matrices, so we work entry-by-entry and use Definition ME. For \(1\leq i\leq m\text{,}\) \(1\leq j\leq n\text{,}\)

\begin{align*} \matrixentry{\transpose{\left(\transpose{A}\right)}}{ij}&= \matrixentry{\transpose{A}}{ji}&& \knowl{./knowl/definition-TM.html}{\text{Definition TM}}\\ &=\matrixentry{A}{ij}&& \knowl{./knowl/definition-TM.html}{\text{Definition TM}}\text{.} \end{align*}

Since the matrices \(\transpose{\left(\transpose{A}\right)}\) and \(A\) agree at each entry, Definition ME tells us the two matrices are equal.

Subsection MCC Matrices and Complex Conjugation

As we did with vectors (Definition CCCV), we can define what it means to take the conjugate of a matrix.

Definition CCM. Complex Conjugate of a Matrix.

Suppose \(A\) is an \(m\times n\) matrix. Then the conjugate of \(A\text{,}\) written \(\conjugate{A}\) is an \(m\times n\) matrix defined by \(\matrixentry{\conjugate{A}}{ij}=\conjugate{\matrixentry{A}{ij}}\) for \(1\leq i\leq m\text{,}\) \(1\leq j\leq n\text{.}\)

For the \(2\times 3\) matrix \(A\text{,}\) we compute the conjugate of \(A\text{,}\) \(\conjugate{A}\text{.}\)

\begin{align*} A&= \begin{bmatrix} 2-i & 3 & 5+4i\\ -3+6i & 2-3i & 0 \end{bmatrix} & \conjugate{A}&= \begin{bmatrix} 2+i & 3 & 5-4i\\ -3-6i & 2+3i & 0 \end{bmatrix} \end{align*}

The interplay between the conjugate of a matrix and the two operations on matrices is what you might expect.

For \(1\leq i\leq m\text{,}\) \(1\leq j\leq n\text{,}\)

\begin{align*} \matrixentry{\conjugate{A+B}}{ij} &=\conjugate{\matrixentry{A+B}{ij}}&& \knowl{./knowl/definition-CCM.html}{\text{Definition CCM}}\\ &=\conjugate{\matrixentry{A}{ij}+\matrixentry{B}{ij}}&& \knowl{./knowl/definition-MA.html}{\text{Definition MA}}\\ &=\conjugate{\matrixentry{A}{ij}}+\conjugate{\matrixentry{B}{ij}}&& \knowl{./knowl/theorem-CCRA.html}{\text{Theorem CCRA}}\\ &=\matrixentry{\conjugate{A}}{ij}+\matrixentry{\conjugate{B}}{ij}&& \knowl{./knowl/definition-CCM.html}{\text{Definition CCM}}\\ &=\matrixentry{\conjugate{A}+\conjugate{B}}{ij}&& \knowl{./knowl/definition-MA.html}{\text{Definition MA}}\text{.} \end{align*}

Since the matrices \(\conjugate{A+B}\) and \(\conjugate{A}+\conjugate{B}\) are equal in each entry, Definition ME says that \(\conjugate{A+B}=\conjugate{A}+\conjugate{B}\text{.}\)

For \(1\leq i\leq m\text{,}\) \(1\leq j\leq n\text{,}\)

\begin{align*} \matrixentry{\conjugate{\alpha A}}{ij}&= \conjugate{\matrixentry{\alpha A}{ij}}&& \knowl{./knowl/definition-CCM.html}{\text{Definition CCM}}\\ &=\conjugate{\alpha\matrixentry{A}{ij}}&& \knowl{./knowl/definition-MSM.html}{\text{Definition MSM}}\\ &=\conjugate{\alpha}\conjugate{\matrixentry{A}{ij}}&& \knowl{./knowl/theorem-CCRM.html}{\text{Theorem CCRM}}\\ &=\conjugate{\alpha}\matrixentry{\conjugate{A}}{ij}&& \knowl{./knowl/definition-CCM.html}{\text{Definition CCM}}\\ &=\matrixentry{\conjugate{\alpha}\conjugate{A}}{ij}&& \knowl{./knowl/definition-MSM.html}{\text{Definition MSM}}\text{.} \end{align*}

Since the matrices \(\conjugate{\alpha A}\) and \(\conjugate{\alpha}\conjugate{A}\) are equal in each entry, Definition ME says that \(\conjugate{\alpha A}=\conjugate{\alpha}\conjugate{A}\text{.}\)

For \(1\leq i\leq m\text{,}\) \(1\leq j\leq n\text{,}\)

\begin{align*} \matrixentry{\conjugate{\left(\conjugate{A}\right)}}{ij}&= \conjugate{\matrixentry{\conjugate{A}}{ij}}&& \knowl{./knowl/definition-CCM.html}{\text{Definition CCM}}\\ &=\conjugate{\conjugate{\matrixentry{A}{ij}}}&& \knowl{./knowl/definition-CCM.html}{\text{Definition CCM}}\\ &=\matrixentry{A}{ij}&& \knowl{./knowl/theorem-CCT.html}{\text{Theorem CCT}}\text{.} \end{align*}

Since the matrices \(\conjugate{\left(\conjugate{A}\right)}\) and \(A\) are equal in each entry, Definition ME says that \(\conjugate{\left(\conjugate{A}\right)}=A\text{.}\)

Finally, we will need the following result about matrix conjugation and transposes later.

For \(1\leq i\leq m\text{,}\) \(1\leq j\leq n\text{,}\)

\begin{align*} \matrixentry{\conjugate{\left(\transpose{A}\right)}}{ji}&= \conjugate{\matrixentry{\transpose{A}}{ji}}&& \knowl{./knowl/definition-CCM.html}{\text{Definition CCM}}\\ &=\conjugate{\matrixentry{A}{ij}}&& \knowl{./knowl/definition-TM.html}{\text{Definition TM}}\\ &=\matrixentry{\conjugate{A}}{ij}&& \knowl{./knowl/definition-CCM.html}{\text{Definition CCM}}\\ &=\matrixentry{\transpose{\left(\conjugate{A}\right)}}{ji}&& \knowl{./knowl/definition-TM.html}{\text{Definition TM}}\text{.} \end{align*}

Since the matrices \(\conjugate{\left(\transpose{A}\right)}\) and \(\transpose{\left(\conjugate{A}\right)}\) are equal in each entry, Definition ME says that \(\conjugate{\left(\transpose{A}\right)}=\transpose{\left(\conjugate{A}\right)}\text{.}\)

Subsection AM Adjoint of a Matrix

The combination of transposing and conjugating a matrix will be important in subsequent sections, such as Subsection MINM.UM and Section OD. We make a key definition here and prove some basic results in the same spirit as those above.

Definition A. Adjoint.

If \(A\) is a matrix, then its adjoint is \(\adjoint{A}=\transpose{\left(\conjugate{A}\right)}\text{.}\)

You will see the adjoint written elsewhere variously as \(A^H\text{,}\) \(A^\ast\) or \(A^\dagger\text{.}\) Notice that Theorem MCT says it does not really matter if we conjugate and then transpose, or transpose and then conjugate.

\begin{align*} \adjoint{\left(A+B\right)}&=\transpose{\left(\conjugate{A+B}\right)}&& \knowl{./knowl/definition-A.html}{\text{Definition A}}\\ &=\transpose{\left(\conjugate{A}+\conjugate{B}\right)}&& \knowl{./knowl/theorem-CRMA.html}{\text{Theorem CRMA}}\\ &=\transpose{\left(\conjugate{A}\right)}+\transpose{\left(\conjugate{B}\right)}&& \knowl{./knowl/theorem-TMA.html}{\text{Theorem TMA}}\\ &=\adjoint{A}+\adjoint{B}&& \knowl{./knowl/definition-A.html}{\text{Definition A}} \end{align*}
\begin{align*} \adjoint{\left(\alpha A\right)}&= \transpose{\left(\conjugate{\alpha A}\right)}&& \knowl{./knowl/definition-A.html}{\text{Definition A}}\\ &=\transpose{\left(\conjugate{\alpha}\conjugate{A}\right)}&& \knowl{./knowl/theorem-CRMSM.html}{\text{Theorem CRMSM}}\\ &=\conjugate{\alpha}\transpose{\left(\conjugate{A}\right)}&& \knowl{./knowl/theorem-TMSM.html}{\text{Theorem TMSM}}\\ &=\conjugate{\alpha}\adjoint{A}&& \knowl{./knowl/definition-A.html}{\text{Definition A}} \end{align*}
\begin{align*} \adjoint{\left(\adjoint{A}\right)}&= \transpose{\left(\conjugate{\left(\adjoint{A}\right)}\right)}&& \knowl{./knowl/definition-A.html}{\text{Definition A}}\\ &=\conjugate{\left(\transpose{\left(\adjoint{A}\right)}\right)}&& \knowl{./knowl/theorem-MCT.html}{\text{Theorem MCT}}\\ &=\conjugate{\left(\transpose{\left(\transpose{\left(\conjugate{A}\right)}\right)}\right)}&& \knowl{./knowl/definition-A.html}{\text{Definition A}}\\ &=\conjugate{\left(\conjugate{A}\right)}&& \knowl{./knowl/theorem-TT.html}{\text{Theorem TT}}\\ &=A&& \knowl{./knowl/theorem-CCM.html}{\text{Theorem CCM}} \end{align*}

Take note of how the theorems in this section, while simple, build on earlier theorems and definitions and never descend to the level of entry-by-entry proofs based on Definition ME. In other words, the equal signs that appear in the previous proofs are equalities of matrices, not scalars (which is the opposite of a proof like that of Theorem TMA).

Every operation in this section is implemented in Sage. The only real subtlety is determining if certain matrices are symmetric, which we will discuss below. In linear algebra, the term “adjoint” has two unrelated meanings, so you need to be careful when you see this term. In particular, in Sage it is used to mean something different. So our version of the adjoint is implemented as the matrix method .conjugate_transpose(). Here are some straightforward examples.

With these constructions, we can test, or demonstrate, some of the theorems above. Of course, this does not make the theorems true, but is satisfying nonetheless. This can be an effective technique when you are learning new Sage commands or new linear algebra — if your computations are not consistent with theorems, then your understanding of the linear algebra may be flawed, or your understanding of Sage may be flawed, or Sage may have a bug! Note in the following how we use comparison (==) between matrices as the implementation of matrix equality (Definition ME).

The opposite is true — you can use theorems to convert, or express, Sage code into alternative, but mathematically equivalent forms.

Here is the subtlety. With approximate numbers, such as in RDF and CDF, it can be tricky to decide if two numbers are equal, or if a very small number is zero or not. In these situations Sage allows us to specify a “tolerance” — the largest number that can be effectively considered zero. Consider the following:

Clearly the last result is not correct. This is because \(0.000000000001 = 1.0\times 10^{-12}\) is “small enough” to be confused as equal to the zero in the other corner of the matrix. However, Sage will let us set our own idea of when two numbers are equal, by setting a tolerance on the difference between two numbers that will allow them to be considered equal. The default tolerance is set at \(1.0\times 10^{-12}\text{.}\) Here we use Sage's syntax for scientific notation to specify the tolerance.

This is not a course in numerical linear algebra, even if that is a fascinating field of study. To concentrate on the main ideas of introductory linear algebra, whenever possible we will concentrate on number systems like the rational numbers or algebraic numbers where we can rely on exact results. If you are ever unsure if a number system is exact or not, just ask.

Reading Questions MO Reading Questions

1.

Perform the following matrix computation.

\begin{equation*} (6) \begin{bmatrix} 2 & -2 & 8 & 1 \\ 4 & 5 & -1 & 3\\ 7 & -3 & 0 & 2 \end{bmatrix} + (-2) \begin{bmatrix} 2 & 7 & 1 & 2\\ 3 & -1 & 0 & 5\\ 1 & 7 & 3 & 3 \end{bmatrix} \end{equation*}
2.

Theorem VSPM reminds you of what previous theorem? How strong is the similarity?

3.

Compute the transpose of the matrix below.

\begin{equation*} \begin{bmatrix} 6 & 8 & 4 \\ -2 & 1 & 0 \\ 9 & -5 & 6 \end{bmatrix} \end{equation*}

Exercises MO Exercises

C10.

Let \(A = \begin{bmatrix} 1 & 4 & -3 \\ 6 & 3 & 0\end{bmatrix}\text{,}\) \(B = \begin{bmatrix} 3 & 2 & 1 \\ -2 & -6 & 5\end{bmatrix}\) and \(C = \begin{bmatrix} 2 & 4 \\ 4 & 0 \\ -2 & 2\end{bmatrix}\text{.}\) Let \(\alpha = 4\) and \(\beta = 1/2\text{.}\) Perform the following calculations: (1) \(A + B\text{,}\) (2) \(A + C\text{,}\) (3) \(\transpose{B} + C\text{,}\) (4) \(A + \transpose{B}\text{,}\) (5) \(\beta C\text{,}\) (6) \(4A - 3B\text{,}\) (7) \(\transpose{A} + \alpha C\text{,}\) (8) \(A + B - \transpose{C}\text{,}\) (9) \(4A + 2B - 5\transpose{C}\text{.}\)

Solution
  1. \(A + B = \begin{bmatrix} 4 & 6 & -2 \\ 4 & -3 & 5 \end{bmatrix}\text{.}\)
  2. \(A + C\) is undefined; \(A\) and \(C\) are not the same size.
  3. \(\transpose{B} + C = \begin{bmatrix} 5 & 2 \\ 6 & -6 \\ -1 & 7 \end{bmatrix}\text{.}\)
  4. \(A + \transpose{B}\) is undefined; \(A\) and \(\transpose{B}\) are not the same size.
  5. \(\beta C = \begin{bmatrix} 1 & 2 \\ 2 & 0 \\ -1 & 1 \end{bmatrix}\text{.}\)
  6. \(4A - 3B = \begin{bmatrix} -5 & 10 & -15\\ 30 & 30 & -15 \end{bmatrix}\text{.}\)
  7. \(\transpose{A} + \alpha C = \begin{bmatrix} 9 & 22 \\ 20 & 3\\ -11 & 8 \end{bmatrix}\text{.}\)
  8. \(A + B - \transpose{C} = \begin{bmatrix} 2 & 2 & 0\\ 0 & -3 & 3\end{bmatrix}\text{.}\)
  9. \(4A + 2B - 5\transpose{C} = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}\text{.}\)
C11.

Solve the given vector equation for \(x\text{,}\) or explain why no solution exists.

\begin{equation*} 2 \begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 2 \end{bmatrix} - 3 \begin{bmatrix} 1 & 1 & 2 \\ 0 & 1 & x \end{bmatrix} = \begin{bmatrix} -1 & 1 & 0 \\ 0 & 5 & -2 \end{bmatrix} \end{equation*}
Solution

The given equation

\begin{align*} \begin{bmatrix} -1 & 1 & 0 \\ 0 & 5 & -2 \end{bmatrix} &= 2\begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 2 \end{bmatrix} - 3\begin{bmatrix} 1 & 1 & 2 \\ 0 & 1 & x \end{bmatrix} = \begin{bmatrix} -1 & 1 & 0 \\ 0 &5 & 4 - 3x \end{bmatrix} \end{align*}

is valid only if \(4 - 3x = -2\text{.}\) Thus, the only solution is \(x = 2\text{.}\)

C12.

Solve the given matrix equation for \(\alpha\text{,}\) or explain why no solution exists.

\begin{equation*} \alpha\begin{bmatrix} 1 & 3 & 4 \\ 2 & 1 & -1 \end{bmatrix} + \begin{bmatrix} 4 & 3 & -6 \\ 0 & 1 & 1 \end{bmatrix} = \begin{bmatrix} 7 & 12 & 6 \\ 6 & 4 & -2 \end{bmatrix} \end{equation*}
Solution

The given equation

\begin{align*} \begin{bmatrix} 7 & 12 & 6\\ 6 & 4 & -2 \end{bmatrix} &= \alpha\begin{bmatrix} 1 & 3 & 4 \\ 2 & 1 & -1 \end{bmatrix} + \begin{bmatrix} 4 & 3 & -6 \\ 0 & 1 & 1 \end{bmatrix}\\ &= \begin{bmatrix} \alpha & 3\alpha & 4\alpha \\ 2\alpha & \alpha & -\alpha \end{bmatrix} + \begin{bmatrix} 4 & 3 & -6 \\ 0 & 1 & 1 \end{bmatrix}\\ &= \begin{bmatrix} 4 + \alpha & 3 + 3\alpha & -6 + 4\alpha \\ 2\alpha & 1 + \alpha & 1 - \alpha \end{bmatrix} \end{align*}

leads to the 6 equations in \(\alpha\)

\begin{align*} 4 + \alpha &= 7\\ 3 + 3\alpha &= 12\\ -6 + 4\alpha &= 6\\ 2\alpha &= 6\\ 1 + \alpha &= 4\\ 1 - \alpha &= -2\text{.} \end{align*}

The only value that solves all 6 equations is \(\alpha = 3\text{,}\) which is the solution to the original matrix equation.

C13.

Solve the given matrix equation for \(\alpha\text{,}\) or explain why no solution exists.

\begin{equation*} \alpha \begin{bmatrix} 3 & 1 \\ 2 & 0 \\ 1 & 4\end{bmatrix} - \begin{bmatrix} 4 & 1 \\ 3 & 2 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 1 & -2 \\ 2 & 6 \end{bmatrix} \end{equation*}
Solution

The given equation

\begin{align*} \begin{bmatrix} 2 & 1 \\ 1 & -2 \\ 2 & 6 \end{bmatrix} &= \alpha\begin{bmatrix} 3 & 1 \\ 2 & 0 \\ 1 & 4 \end{bmatrix} - \begin{bmatrix} 4 & 1 \\ 3 & 2 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 3\alpha - 4 & \alpha - 1 \\ 2\alpha - 3 & -2 \\ \alpha & 4\alpha - 1 \end{bmatrix} \end{align*}

gives a system of six equations in \(\alpha\)

\begin{align*} 3\alpha - 4 &= 2\\ \alpha - 1 &= 1 \\ 2\alpha - 3&= 1\\ -2 &= -2\\ \alpha &= 2\\ 4\alpha - 1 &= 6\text{.} \end{align*}

Solving each of these equations, we see that the first three and the fifth all lead to the solution \(\alpha = 2\text{,}\) the fourth equation is true no matter what the value of \(\alpha\text{,}\) but the last equation is only solved by \(\alpha = 7/4\text{.}\) Thus, the system has no solution, and the original matrix equation also has no solution.

C14.

Find \(\alpha\) and \(\beta\) that solve the following equation.

\begin{equation*} \alpha\begin{bmatrix} 1 & 2 \\ 4 & 1 \end{bmatrix} + \beta\begin{bmatrix} 2 & 1 \\ 3 & 1 \end{bmatrix} = \begin{bmatrix} -1 & 4 \\ 6 & 1 \end{bmatrix} \end{equation*}
Solution

The given equation

\begin{align*} \begin{bmatrix} -1 & 4 \\ 6 & 1 \end{bmatrix} &= \alpha \begin{bmatrix} 1 & 2 \\ 4 & 1 \end{bmatrix} + \beta \begin{bmatrix} 2 & 1 \\ 3 & 1 \end{bmatrix} = \begin{bmatrix} \alpha + 2\beta & 2\alpha + \beta \\ 4\alpha + 3\beta & \alpha + \beta \end{bmatrix} \end{align*}

gives a system of four equations in two variables

\begin{align*} \alpha + 2\beta &= -1\\ 2\alpha + \beta &= 4\\ 4\alpha + 3\beta &= 6\\ \alpha + \beta &= 1\text{.} \end{align*}

Solving this linear system by row-reducing the augmented matrix shows that \(\alpha = 3\text{,}\) \(\beta = -2\) is the only solution.

In Chapter V we defined the operations of vector addition and vector scalar multiplication in Definition CVA and Definition CVSM. These two operations formed the underpinnings of the remainder of the chapter. We have now defined similar operations for matrices in Definition MA and Definition MSM. You will have noticed the resulting similarities between Theorem VSPCV and Theorem VSPM.

In Exercises M20–M25, you will be asked to extend these similarities to other fundamental definitions and concepts we first saw in Chapter V. This sequence of problems was suggested by Martin Jackson.

M20.

Suppose \(S=\set{B_1,\,B_2,\,B_3,\,\ldots,\,B_p}\) is a set of matrices from \(M_{mn}\text{.}\) Formulate appropriate definitions for the following terms and give an example of the use of each.

  1. A linear combination of elements of \(S\text{.}\)
  2. A relation of linear dependence on \(S\text{,}\) both trivial and nontrivial.
  3. \(S\) is a linearly independent set.
  4. \(\spn{S}\text{.}\)
M21.

Show that the set \(S\) is linearly independent in \(M_{22}\text{.}\)

\begin{equation*} S=\set{ \begin{bmatrix}1&0\\0&0\end{bmatrix},\, \begin{bmatrix}0&1\\0&0\end{bmatrix},\, \begin{bmatrix}0&0\\1&0\end{bmatrix},\, \begin{bmatrix}0&0\\0&1\end{bmatrix} }\text{.} \end{equation*}
Solution

Suppose there exist constants \(\alpha\text{,}\) \(\beta\text{,}\) \(\gamma\text{,}\) and \(\delta\) so that

\begin{align*} \alpha \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} + \beta \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} + \gamma \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix} + \delta \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} &= \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}\text{.} \end{align*}

Then

\begin{align*} \begin{bmatrix}\alpha & 0 \\ 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & \beta \\ 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ \gamma & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ 0 & \delta \end{bmatrix} &= \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} \end{align*}

so that

\begin{equation*} \begin{bmatrix} \alpha & \beta \\ \gamma & \delta \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}\text{.} \end{equation*}

The only solution is then \(\alpha = 0\text{,}\) \(\beta = 0\text{,}\) \(\gamma = 0\text{,}\) and \(\delta = 0\text{,}\) so that the set \(S\) is a linearly independent set of matrices.

M22.

Determine if the set \(S\) below is linearly independent in \(M_{23}\text{.}\)

\begin{equation*} \set{ \begin{bmatrix} -2 & 3 & 4 \\ -1 & 3 & -2 \end{bmatrix},\, \begin{bmatrix} 4 & -2 & 2 \\ 0 & -1 & 1 \end{bmatrix},\, \begin{bmatrix}-1 & -2 & -2 \\ 2 & 2 & 2 \end{bmatrix},\, \begin{bmatrix}-1 & 1 & 0 \\ -1 & 0 & -2 \end{bmatrix},\, \begin{bmatrix}-1 & 2 & -2 \\ 0 & -1 & -2 \end{bmatrix} } \end{equation*}
Solution

Suppose that there exist constants \(a_1\text{,}\) \(a_2\text{,}\) \(a_3\text{,}\) \(a_4\text{,}\) and \(a_5\) so that

\begin{align*} a_1 \begin{bmatrix} -2 & 3 & 4 \\ -1 & 3 & -2 \end{bmatrix} + a_2 \begin{bmatrix} 4 & -2 & 2 \\ 0 & -1 & 1 \end{bmatrix} + a_3 \begin{bmatrix} -1 & -2 & -2 \\ 2 & 2 & 2 \end{bmatrix} + a_4 \begin{bmatrix} -1 & 1 & 0\\ -1 & 0 & -2 \end{bmatrix} + a_5 \begin{bmatrix} -1 & 2 & -2\\ 0 & -1 & -2 \end{bmatrix} &= \begin{bmatrix} 0 & 0 & 0\\0 & 0 & 0 \end{bmatrix} \end{align*}

Then, we have the matrix equality (Definition ME)

\begin{align*} \begin{bmatrix} -2a_1 + 4a_2 - a_3 - a_4 - a_5 & 3a_1 - 2a_2 - 2a_3 + a_4 + 2a_5 & 4a_1 + 2a_2 - 2a_3 - 2a_5\\ -a_1 + 2a_3 - a_4 & 3a_1 - a_2 + 2a_3 - a_5 & -2a_1 + a_2 + 2a_3 - 2a_4 - 2a_5 \end{bmatrix} &= \begin{bmatrix} 0 & 0 & 0\\0 & 0 & 0 \end{bmatrix} \end{align*}

which yields the linear system of equations

\begin{align*} -2a_1 + 4a_2 - a_3 - a_4 - a_5 &= 0\\ 3a_1 - 2a_2 - 2a_3 + a_4 + 2a_5&= 0\\ 4a_1 + 2a_2 - 2a_3 - 2a_5&=0\\ -a_1 + 2a_3 - a_4 &= 0\\ 3a_1 - a_2 + 2a_3 - a_5 &= 0\\ -2a_1 + a_2 + 2a_3 + 2a_4 - 2a_5 &= 0\text{.} \end{align*}

By row-reducing the associated \(6\times 5\) homogeneous system, we see that the only solution is \(a_1 = a_2 = a_3 = a_4 = a_5 = 0\text{,}\) so these matrices are a linearly independent subset of \(M_{23}\text{.}\)

M23.

Determine if the matrix \(A\) is in the span of \(S\text{.}\) In other words, is \(A\in\spn{S}\text{?}\) If so write \(A\) as a linear combination of the elements of \(S\text{.}\)

\begin{align*} A&= \begin{bmatrix} -13 & 24 & 2\\ -8 & -2 & -20 \end{bmatrix}\\ S&=\set{ \begin{bmatrix} -2 & 3 & 4 \\ -1 & 3 & -2 \end{bmatrix},\, \begin{bmatrix} 4 & -2 & 2 \\ 0 & -1 & 1 \end{bmatrix},\, \begin{bmatrix}-1 & -2 & -2 \\ 2 & 2 & 2 \end{bmatrix},\, \begin{bmatrix}-1 & 1 & 0 \\ -1 & 0 & -2 \end{bmatrix},\, \begin{bmatrix}-1 & 2 & -2 \\ 0 & -1 & -2 \end{bmatrix} } \end{align*}
Solution

The matrix \(A\) is in the span of \(S\text{,}\) since

\begin{align*} \begin{bmatrix} -13 & 24 & 2 \\ -8 & -2 & -20 \end{bmatrix} &= 2\begin{bmatrix} -2 & 3 & 4 \\ -1 & 3 & -2 \end{bmatrix} -2\begin{bmatrix} 4 & -2 & 2 \\ 0 & -1 & 1 \end{bmatrix} -3\begin{bmatrix} -1 & -2 & -2 \\ 2 & 2 & 2 \end{bmatrix} + 4\begin{bmatrix} -1 & 2 & -2 \\0 & -1 & -2 \end{bmatrix} \end{align*}

Note that if we were to write a complete linear combination of all of the matrices in \(S\text{,}\) then the fourth matrix would have a zero coefficient.

M24.

Suppose \(Y\) is the set of all \(3\times 3\) symmetric matrices (Definition SYM). Find a set \(T\) so that \(T\) is linearly independent and \(\spn{T}=Y\text{.}\)

Solution

Since any symmetric matrix is of the form

\begin{align*} \begin{bmatrix} a & b & c \\ b & d & e \\ c & e & f \end{bmatrix} &= \begin{bmatrix} a & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & b & 0 \\ b & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 & c \\ 0 & 0 & 0 \\ c & 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 & 0 \\ 0 & d & 0 \\ 0 & 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & e \\ 0 & e & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & f \end{bmatrix} \end{align*}

any symmetric matrix is a linear combination of the linearly independent vectors in set \(T\) below, so that \(\spn{T} = Y\)

\begin{equation*} T = \set{ \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 & 1 \\ 0 & 0 & 0 \\ 1 & 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix} }\text{.} \end{equation*}

(Something to think about: How do we know that these matrices are linearly independent?)

M25.

Define a subset of \(M_{33}\) by

\begin{equation*} U_{33}=\setparts{ A\in M_{33} }{ \matrixentry{A}{ij}=0\text{ whenever }i\gt j }\text{.} \end{equation*}

Find a set \(R\) so that \(R\) is linearly independent and \(\spn{R}=U_{33}\text{.}\)

T13.

Prove Property CM of Theorem VSPM. Write your proof in the style of the proof of Property DSAM given in this section.

Solution

For all \(A,\,B\in M_{mn}\) and for all \(1\leq i\leq m\text{,}\) \(1\leq j\leq n\text{,}\)

\begin{align*} \matrixentry{A+B}{ij}&=\matrixentry{A}{ij}+\matrixentry{B}{ij}&& \knowl{./knowl/definition-MA.html}{\text{Definition MA}}\\ &=\matrixentry{B}{ij}+\matrixentry{A}{ij}&& \knowl{./knowl/property-CACN.html}{\text{Property CACN}}\\ &=\matrixentry{B+A}{ij}&& \knowl{./knowl/definition-MA.html}{\text{Definition MA}}\text{.} \end{align*}

With equality of each entry of the matrices \(A+B\) and \(B+A\) being equal Definition ME tells us the two matrices are equal.

A matrix \(A\) is skew-symmetric if \(\transpose{A}=-A\) Exercises T30–T37 employ this definition.

T30.

Prove that a skew-symmetric matrix is square. (Hint: study the proof of Theorem SMS.)

T31.

Prove that a skew-symmetric matrix must have zeros for its diagonal elements. In other words, if \(A\) is skew-symmetric of size \(n\text{,}\) then \(\matrixentry{A}{ii}=0\) for \(1\leq i\leq n\text{.}\) (Hint: carefully construct an example of a \(3\times 3\) skew-symmetric matrix before attempting a proof.)

T32.

Prove that a matrix \(A\) is both skew-symmetric and symmetric if and only if \(A\) is the zero matrix. (Hint: one half of this proof is very easy, the other half takes a little more work.)

T33.

Suppose \(A\) and \(B\) are both skew-symmetric matrices of the same size and \(\alpha,\,\beta\in\complexes\text{.}\) Prove that \(\alpha A + \beta B\) is a skew-symmetric matrix.

T34.

Suppose \(A\) is a square matrix. Prove that \(A+\transpose{A}\) is a symmetric matrix.

T35.

Suppose \(A\) is a square matrix. Prove that \(A-\transpose{A}\) is a skew-symmetric matrix.

T36.

Suppose \(A\) is a square matrix. Prove that there is a symmetric matrix \(B\) and a skew-symmetric matrix \(C\) such that \(A=B+C\text{.}\) In other words, any square matrix can be decomposed into a symmetric matrix and a skew-symmetric matrix (Proof Technique DC). (Hint: consider building a proof on Exercise MO.T34 and Exercise MO.T35.)