maths.freeLinear Algebra › 3. Matrices › Matrix Operations

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.

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.

  1. (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}
  2. \begin{bmatrix} 6 & 8 & 4 \\ -2 & 1 & 0 \\ 9 & -5 & 6 \end{bmatrix}

In we defined the operations of vector addition and vector scalar multiplication in and . These two operations formed the underpinnings of the remainder of the chapter. We have now defined similar operations for matrices in and . You will have noticed the resulting similarities between and .

In Exercises M20M25, you will be asked to extend these similarities to other fundamental definitions and concepts we first saw in . This sequence of problems was suggested by .

A matrix $A$ is skew-symmetric if $\transpose{A}=-A$ Exercises T30T37 employ this definition.

Matrix Equality, Addition, Scalar Multiplication

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

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}$. Again, we will overload a symbol (`+') and a convention (juxtaposition for scalar multiplication).

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.

Example: Addition of two matrices in $M_{23}$

If A= \begin{bmatrix} 2&-3&4\\ 1&0&-7 \end{bmatrix} && B= \begin{bmatrix} 6&2&-4\\ 3&5&2 \end{bmatrix} then 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}

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.

Condensed — the full section is in Beezer, A First Course in Linear Algebra.

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.

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

The zero matrix described in this theorem, $\zeromatrix$, is what you would expect a matrix full of zeros.

Condensed — the full section is in Beezer, A First Course in Linear Algebra.

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.

Example: Transpose of a $3\times 4$ matrix

Suppose D= \begin{bmatrix} 3&7&2&-3\\ -1&4&2&8\\ 0&3&-2&5 \end{bmatrix}.

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 we have \transpose{D}= \begin{bmatrix} 3&-1&0\\ 7&4&3\\ 2&2&-2\\ -3&8&5 \end{bmatrix}

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.

Example: A symmetric $5\times 5$ matrix

The matrix 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} is symmetric.

You might have noticed that did not specify the size of the matrix $A$, 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 now.

Condensed — the full section is in Beezer, A First Course in Linear Algebra.

Matrices and Complex Conjugation

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

Example: Complex conjugate of a matrix

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

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

Condensed — the full section is in Beezer, A First Course in Linear Algebra.

Adjoint of a Matrix

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

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

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 . 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 ).

Condensed — the full section is in Beezer, A First Course in Linear Algebra.

Symbols used here

A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}
matrix
A rectangular array of numbers; a linear map.
i
imaginary unit
i² = −1.
\leq,\ \geq
less/greater than or equal
Inequalities that allow equality; < and > exclude it.
\mathbf{v},\ \vec{v}
vector
A quantity with magnitude and direction; a column of numbers.
\det A,\ |A|
determinant
Scaling factor of area/volume under A; zero means singular.
A^{-1},\ A^{T}
inverse, transpose
The matrix that undoes A; A with rows and columns swapped.
\lambda
lambda (eigenvalue)
The factor by which an eigenvector is stretched: Av = λv.
\mathbf{u} \cdot \mathbf{v},\ \|\mathbf{v}\|
dot product, norm
Σ u_i v_i; the length of v, √(v·v).

Questions people ask

What does a determinant mean geometrically?

It is the factor by which the matrix scales area (2×2) or volume (3×3), with a negative sign if orientation flips. Zero means the matrix flattens space and cannot be undone.

What is an eigenvector?

A direction the matrix does not turn — it only stretches it by the eigenvalue. Along eigenvectors a complicated matrix acts like multiplication by a number.

Why is matrix multiplication not commutative?

Because a matrix is a transformation and AB means "do B, then A". Rotating then reflecting is not the same as reflecting then rotating.

Jiri gị onwe gị

Parts of this page are adapted from Beezer, A First Course in Linear Algebra (GFDL 1.2). Condensed and re-explained here; errors are ours.

Oge Linear Algebra