In this explainer, we will learn how to find the image and basis of the kernel of a linear transformation.

Very often, we will be interested in solving a system of linear equations that is encoded by matrix equations rather than being written out as full equations. There are several advantages to writing the system of equation in matrix form, not least of which is being neater and less confusing in completing calculations. Typically, we would take a general system of linear equations and prefer to express this by the matrix equation

The matrix on the left-hand side is called the “coefficient matrix” and, out of the three matrices above, it is the matrix that we are most interested in, as it entirely encodes how the variables will be transformed in order to describe the full system of linear equations. If we were to further define the three matrices as then we could write the system of equations as , which is a much neater expression. This also allows us to define a concept that appears frequently in linear algebra, especially in the more abstract interpretations of the subject.

### Definition: Kernel of a Matrix

Consider a matrix with order . Then, the “kernel” of is denoted and is defined as the set of all matrices of order such that where is the zero matrix of order . This is often referred to as finding the solution space of the homogeneous system associated to .

In the definition above, it is more common to refer to both and as “vectors” or “column vectors.” Whichever name is used, finding the kernel of the matrix ultimately requires us to find all possible such that

This is often referred to as solving the homogeneous system of linear equations that is associated to the matrix , which is achieved with the familiar recourse to Gauss–Jordan elimination (or any equivalent method). We will demonstrate how to find the kernel of a matrix in the following example.

Suppose that we wanted to find the kernel of the matrix

Then, by definition, is the set of all vectors such that . In other words, we must find all such that

We can do this by taking the coefficient matrix and using row operations to manipulate this matrix into reduced echelon form, which is more often known as Gauss–Jordan elimination. This process is normally helped by highlighting the pivots, which are the first nonzero entries in each row. For matrix , the pivots are shown as follows:

To achieve the reduced echelon form of , we must first ensure that the first column is populated only by zeros, except for the first entry. We can eliminate the nonzero entries in the second and third rows with row operations and , which give the matrix

Next, we need to remove the nonzero entry below the pivot in the second row, which requires the row operation , giving

For posterity, we change the sign of the pivot in the third row with the row operation . This gives

Currently, there are two nonzero entries above the pivot in the third row. These must be culled, which is achieved with the joint row operations and :

We are reasonably close to achieving the reduced echelon form. The preparatory step gives the matrix and then the final blow is dealt with the row operation :

This matrix is now in reduced echelon form, meaning that we have effectively solved the homogeneous system of linear equations that is defined by the original matrix . To properly express , it is best to write the corresponding system of linear equations of the above matrix:

The three variables , , and are associated with columns of the reduced echelon matrix that contain pivots, and we will express these in terms of the remaining variable , which corresponds to the only column of that matrix that does not contain a pivot. We will express , , in terms of as shown:

We also have the trivial equation , which we can include in the above equations to give the full solution

It is now simply a matter of writing the solution in vector form and by means of an independent parameter. Given that is all that solves the associated homogeneous system of linear equations, the kernel is therefore any such that

We can set the arbitrary parameter to take any value, and this will produce a vector that solves the homogeneous system. In this sense, is the set of vectors that is generated by this parameter when used as a scalar multiple for the set of vectors

Although we will not explain the definition here, we would therefore say that the above set is the “basis” for . The basis of any transformation represented by a matrix is a way of describing the key ingredients that are necessary for defining the associated vector space. The “dimension” of the basis of a vector space is related to the concepts of the matrix rank and the matrix nullity, which are two core properties associated with every matrix.

### Example 1: Finding the Basis of a Solution Space Where the Coefficient Matrix Is of Order 3 × 3

Find a basis for the solution space of the system

### Answer

To find the basis for the solution space, we first need to find the row-reduced echelon form of the matrix

Before we begin the process of Gauss–Jordan elimination to reduce this matrix to reduced echelon form, we will highlight the first nonzero element of each row, also known as pivots:

If it is possible to keep a 1 entry in the top-left corner, then we would ordinarily choose to do this. We make the row swap , which gives the matrix

Now we need to eliminate the nonzero entry that is below the pivot in the first row. We use the elementary row operation to give the matrix

Now that the pivot in the first row is the only nonzero entry in the column it occupies, we can move on to the second column. Before doing this, we observe that the second row has a factor of 2 that can be removed by the row operation . This gives the matrix

Now we need to eliminate the nonzero entry that is below the pivot in the second row. We use the row operation , which produces a matrix that has a zero row:

We are one step away from reduced echelon form. The last step is to remove the nonzero entry that is above the pivot in the second row, which is completed using the row operation , giving

This matrix is in reduced echelon form and as such represents the solution to the original system. Now we can convert this matrix into a corresponding set of linear equations, where we omit the third row of the matrix because this is a zero row:

We can now solve these equations for the variables associated with one of the pivot columns in the reduced echelon form of the matrix, which in this case are and . This gives

For the sake of completeness, we must include the parameter in the statement of our solution, so we append the trivial equation to give

We can then write the solution as a vector:

Therefore, the basis for solution space is given by the vector

One of the most persistently rewarding aspects of linear algebra is that the majority of the definitions, theorems, and algorithms applies to matrices covering a range of sizes. For example, in the questions above, we used Gauss–Jordan elimination on matrices of order and to find the reduced echelon form and hence a solution to the associated homogeneous system of equations. There was, as ever, no real reason that we chose to work with matrices of this particular order. Given that Gauss–Jordan elimination can be applied to matrices of any order, there is no reason why the technique that we have already studied should not apply to matrices of a larger order. In the remaining two examples, we will consider matrices with order . As we will see, providing that we are comfortable with the usage of row operations to achieve reduced echelon form, these questions are conceptually no more difficult than working with a matrix of any other order, although on average we will have to perform more row operations to find the reduced echelon form.

### Example 2: Finding the Basis of a Solution Space Where the Coefficient Matrix Is of Order 4 × 4

Find the general solution to the system of linear equations

Hence, find a basis for its solution space.

### Answer

In order to find a basis for the solution space of the above system of linear equations, we must first take the coefficient matrix and manipulate this into reduced echelon form. We will highlight the first nonzero entries in each row, which are known as the pivot entries:

Given that there is a 1 entry in the top-left corner, we will use this to remove the remaining nonzero entries in the first column. We can employ the two elementary row operations and to give

The second row is identical to the third row, which means that we can remove this. We know that the criteria of reduced echelon form is that any zero rows are at the bottom of the matrix, so we preemptively use the row swap operation :

Now we can create a zero row in the fourth row by using the operation , which gives

For the sake of neatness, we scale the pivots in the second and the third rows by using and

The pivot in the third row is directly below the pivot in the second row, and hence it must be removed using the row operation , giving

The pivot in the third row has two nonzero entries above it, which must be removed with the two row operations and . This gives

For the final row operation, we only need to remove the nonzero entry above the pivot in the second row. This is achieved using , which gives a matrix that is now in reduced echelon form:

Ignoring the zero row in the fourth row, we write out this system of linear equations in full form as

There are three variables that are associated with pivot columns, and these are , , and . The remaining variable, , is not associated with a pivot column. We then take the above three equations and solve each of them in terms of the pivot variables, giving

For the nonpivot variable , we can also write the rather trivial equation . Injecting this in between the second and third lines in the above equations gives

Written in vector form, the solution is

The basis for the solution space is given by the set

In the above examples, we found a basis that contained one vector, which means that the dimension of the basis is 1. This may not always be the case, because the basis of any space might have a dimension larger than 1 and we would not usually know this until we had performed at least part of the Gauss–Jordan elimination process. In the following example, we will consider a matrix with order that will have a basis with a dimension of 2. Although the solution will be a little more convoluted, it will principally be the same as in the two examples that we gave above. Instead of one vector, the basis of the solution space will feature two vectors, but otherwise, the final result will be expressed as it was in the previous examples.

### Example 3: Finding the Basis of a Solution Space Where the Coefficient Matrix Is of Order 4 × 4

Find a general solution of the system of linear equations and hence find a basis for its solution space.

### Answer

Before finding the basis of this system of linear equations, we will need to find the reduced echelon form of the coefficient matrix on the left-hand side. We label this matrix as

Before performing Gauss–Jordan elimination to find the reduced echelon form of , we highlight the pivots, which are the first nonzero entries of each row:

We need to remove the nonzero entries that are directly below the pivot in the first row. This can be achieved by the three row operations , , and , which gives

We have already produced a zero row in the final row and we can see that the third row is the same as the second row, meaning that this can also be turned into a zero row using the row operation :

The matrix is close to being in reduced echelon form. The pivot in the second row can be scaled to produce an entry of value 1 with the row operation , which gives

To put the matrix in reduced echelon form, we now only need the row operation , which gives the final form

To find the basis of the linear system, we need to take the matrix above and write this as a set of equations:

There are two variables, and , that are associated to columns that contain pivots. The two remaining variables, and , are associated with columns that do not contain pivot variables. We will express the former variables in terms of the latter variables by solving the two equations for these to give

For the nonpivot variables, we could also choose to write and , making the complete set of equations

Then, the complete solution can be parameterized with two variables and and written in vector form as

The basis of the solution space is, therefore,

We can see that, in many ways, finding the basis for a solution space is essentially the same as performing Gauss–Jordan elimination to achieve reduced echelon form and then just writing the solution in a particular format. This does not quite do justice to the concept of a “basis,” which is of far greater importance than our treatment of the topic in this explainer would suggest. As with so many topics in linear algebra, the ability to calculate a basis is dependent on us having a strong understanding of one of the several key concepts (in this case, Gauss–Jordan elimination). This interplay between an abstract concept and a widely applicable computational method is one of the distinct hallmarks of linear algebra and occurs repeatedly throughout the subject.

### Key Points

- The kernel of a matrix is denoted and is the set of all vectors that solve the equation .
- The kernel is also referred to as the solution space of the corresponding homogeneous system of linear equations.
- The kernel of is calculated by finding the reduced echelon form of this matrix using Gauss–Jordan elimination and then writing the solution in a particular way.
- The basis of the kernel of is the set of vectors that correspond to the nonpivot columns in the reduced echelon form of , once any trivial equations for the nonpivot variables have been included.