Documentation

This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

`linalg`::`sumBasis`

Basis for the sum of vector spaces

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

```linalg::sumBasis(`S1, S2, …`)
```

Description

```linalg::sumBasis( S1, S2, ...)``` returns a basis of the vector space V1 + V2 + …, where Vi denotes the vector space spanned by the vectors in `Si`.

To obtain an ordered basis, ```S1, S2, ...``` should be given as lists of vectors.

A basis of the zero-dimensional space is the empty set or list, respectively.

The given vectors must be defined over the same component ring, which must be a field, i.e., a domain of category `Cat::Field`.

Examples

Example 1

We define three vectors over :

```MatQ := Dom::Matrix(Dom::Rational): v1 := MatQ([[3, -2]]); v2 := MatQ([[1, 0]]); v3 := MatQ([[5, -3]])```

A basis of the vector space V1 + V2 + V3 with

• V1 generated by

• V2 generated by

• V3 generated by

is:

`linalg::sumBasis([v1, v2, v3], [v1, v3], [v1 + v2, v2, v1 + v3])`

Example 2

The following set of two vectors:

```MatQ := Dom::Matrix(Dom::Rational): S1 := {MatQ([1, 2, 3]), MatQ([-1, 0, 2])}```

is a basis of a two-dimensional subspace of 3:

`linalg::rank(S1)`

The same holds for the following set:

```S2 := {MatQ([0, 2, 3]), MatQ([2, 4, 6])}; linalg::rank(S2)```

The sum of the corresponding two subspaces is the vector space 3:

`Q3 := linalg::sumBasis(S1, S2)`

Parameters

 `S1, S2, …` A set or list of vectors of the same dimension (a vector is a n×1 or 1 ×n matrix of a domain of category `Cat::Matrix`)

Return Values

Set or a list of vectors, according to the domain type of the parameter `S1`.