# Linear AlgebraMatrices

A **matrix** is a rectangular array of numbers:

We report the size of a matrix using the convention *number of rows by number of columns*. In other words, a matrix with

We refer to the entry in the `A[i,j]`

.

We refer to the entry in the `A[i,j]`

.

Matrices are versatile structures with a variety of problem-solving uses. For example,

A matrix can be thought of as a list of column vectors, so we can use a matrix to package many column vectors into a single mathematical object.

An

matrix can be thought of as a linear transformation fromm\times n to\mathbb{R}^n .\mathbb{R}^m

In this section, we will develop both of these perspectives and define some operations which facilitate common manipulations that arise when handling matrices.

**Definition** (Matrix addition and scalar multiplication)

We define **matrix addition** for two

Likewise, the product of a number

**Exercise**

Find the value of

Note that two matrices are considered equal if each pair of corresponding entries are equal.

The solution is

*Solution.* If we look at the middle entry of the bottom row of the two sides of the equation, get

We can see that this equation will hold regardless of the value of

Solving this equation, we find that

## Matrices as linear transformations

One of the most useful ways to think of a matrix is as a concrete representation of a linear transformation. The following definition provides the connection between matrices and maps between vector spaces.

**Definition** (Matrix-vector multiplication)

If

**Example**

If

As advertised, the transformations described in the definition of matrix-vector multiplication are *linear*:

**Exercise**

Suppose that

*Solution.* Suppose

Consider a second vector

Next, let

These are the two requirements for a transformation to be considered linear, so

It turns out that *every* linear transformation from

With this definition of *all*

**Exercise**

Find the matrix corresponding to the linear transformation

*Solution.* Based on the first component of the expression for

**Exercise**

Suppose that

The intuition is that

*Solution.* If the columns

Therefore, given any solution of

Conversely, if there are distinct solutions

## Matrix multiplication

With the perspective that matrices should represent linear transformations, it makes sense to define matrix multiplication so that corresponds to *composition* of the corresponding linear transformations.

**Definition** (matrix multiplication)

If

This definition specifies the matrix product of two matrices, but it doesn't give us an algorithm for calculating it. Let's work that out in the context of a specific example:

**Exercise** (matrix product) Suppose that

*Solution.* Let

Let's compute the expression

Then, by linearity, we have

This demonstrates that

The principle worked out in this exercise is general: the $k$th column of

where the notation **product column rule**.

## The invertible matrix theorem

The range or null space of a matrix

**Exercise**

Show that a matrix represents an injective transformation if and only if its null space is

*Solution.* A linear transformation always maps a zero vector to the zero vector, so an

If a transformation is not injective, then there are two distinct vectors

The **rank** of

**Example**

The matrix

For a matrix which is **square** (meaning that it represents a transformation from some space

**Theorem** (Invertible matrix theorem)

Suppose that

- The transformation
from\mathbf{x}\mapsto A\mathbf{x} to\mathbb{R}^n is bijective.\mathbb{R}^n - The range of
isA .\mathbb{R}^n - The null space of
isA .\{\boldsymbol{0}\}

In other words, for a linear transformation from

*Proof.* We begin by showing that (ii) and (iii) are equivalent. If the columns of

Conversely, if the null space of

By definition of bijectivity, (ii) and (iii) together imply (i), and (i) implies (ii) and (iii). Therefore, the three statements are equivalent.

## The inverse matrix

If

**Exercise**

Show that if

*Solution.* Consider the linearity equation

which implies that

If **inverse** of *identity* matrix, which has ones along the diagonal starting at the top left entry and zeros elsewhere.

**Example**

If

Therefore

**Exercise**

Let

Use the above example to write

*Solution.* The correct answer is (b). The transformation in (a) maps

The example above illustrates geometrically that to invert a transformation represented by

**Exercise**

Let

- If
andk = n explain why there exists only one vector\mathbf{b} \in \mathbb{R}^n, such that\mathbf{x} A\mathbf{x} = \mathbf{b}. - Suppose
and show that there are vectors ink < n for which the equation\mathbb{R}^n has no solution.A \mathbf{x} = \mathbf{b} - If
and\mathbf{x} \in \mathbb{R}^n both satisfy\mathbf{y} \in \mathbb{R}^n andA\mathbf{x} = \mathbf{b} for some fixed vectorA\mathbf{y} = \mathbf{b} describe geometrically the set of points\mathbf{b} \in \mathbb{R}^n, such that(c_1, c_2) \in \mathbb{R}^2 A(c_1\mathbf{x} + c_2\mathbf{y}) = \mathbf{b}.

Based on the above observations, can the equation

*Solution.*

If

then the columns ofk = n, form a basis forA and so the range of\mathbb{R}^n isA Therefore the corresponding linear transformation is invertible and the only vector that satisfies\mathbb{R}^n. is given byA\mathbf{x} = \mathbf{b} \mathbf{x} = A^{-1}\mathbf{b}. By definition, if the range of

is not all ofA , then there exists a vector\mathbb{R}^n in\mathbf{b} which is not in the range of\mathbb{R}^n . In other words, there existsA such that\mathbf{b}\in \mathbb{R}^n has no solution.A\mathbf{x} = \mathbf{b} From

we see that the set of valid pairs

From