## `linalg::nullspace` -- basis for the null space of a matrix

#### Introduction

`linalg::nullspace``(A)` returns a basis for the null space of the matrix A, i.e., a list B of linearly independent vectors such that A*x=0 if and only if x is a linear combination of the vectors in B.

#### Call(s)

`linalg::nullspace(A)`

#### Parameters

`A` | - | a matrix of a domain of category `Cat::Matrix`

#### Returns

a list of (column) vectors of the domain `Dom::Matrix(R)`, where `R` is the component ring of `A`.

#### Related Functions

`linalg::basis`, `linalg::matlinsolve`, `linsolve`, `numeric::matlinsolve`

#### Details

- The component ring of the matrix `A` must be a field, i.e., a domain of category `Cat::Field`.
- If the component ring of `A` does not have a canonical representation of the zero element, it can happen that `linalg::nullspace` does not find a basis for the null space. In such a case, a wrong result is returned.

#### Example 1

The kernel of the matrix:

    >> A := Dom::Matrix(Dom::Real)(
         [[3^(1/2)*2 - 2, 2], [4, 3^(1/2)*2 + 2]]
       )

                           +-                        -+
                           |     1/2                  |
                           |  2 3    - 2,      2      |
                           |                          |
                           |                 1/2      |
                           |       4,     2 3    + 2  |
                           +-                        -+

is one-dimensional, and a basis is {[-1/(sqrt(3)-1),1]}:

    >> linalg::nullspace(A)

                              -- +-            -+ --
                              |  |       1      |  |
                              |  |  - --------  |  |
                              |  |     1/2      |  |
                              |  |    3    - 1  |  |
                              |  |              |  |
                              |  |       1      |  |
                              -- +-            -+ --

#### Changes

- used to be called `linalg::nullSpace`

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000