Matrix Kernel

## Description

We can use Sage to find the null space (kernel) of a matrix, or in other words the set of all vectors $\mathbf{v}$ such that $A\mathbf{v} = \mathbf{0}$. The Sage cell below computes the null space of

(1)
\begin{align} A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix}. \end{align}

## Sage Cell

#### Code

A = matrix([[1, 2, 3], [4, 5, 6]])
A.right_kernel()


## Options

#### Computing the Left Kernel

There is also a left_kernel() command, which gives us all vectors $\mathbf{v}$ such that $\mathbf{v}A = \mathbf{0}$

#### Code

A = matrix([[1, 2, 3], [4, 5, 6]])
A.left_kernel()


#### Testing for Finiteness

We can use the is_finite() method to see if a given null space is a finite set.

#### Code

A = matrix([[1, 2, 3], [4, 5, 6]])
nsp = A.right_kernel()
nsp.is_finite()


## Tags

CC:

Primary Tags: Linear Algebra: Euclidean spaces

Secondary Tags: Euclidean spaces: Row, column, and null spaces

A list of possible tags can be found at The WeBWorK Open Problem Library. For linear algebra tags see the Curated Courses Project.