Function Repository Resource:

# CanonicalBasis

Obtain the canonical bases for selected spaces of matrices and functions

Contributed by: Dennis M Schneider
 ResourceFunction["CanonicalBasis"][type,var,degree] returns the canonical basis for polynomials or trigonometric polynomials of degree at most degree in the variable var. ResourceFunction["CanonicalBasis"][type,size] returns the canonical basis for the space of matrices of type type and size size.

## Details and Options

The basis returned by ResourceFunction["CanonicalBasis"] is a basis for the given vector space over the real numbers, not the complex numbers.
The value for type can be any of the following:
 "DiagonalMatrices" "HermitianMatrices" "Matrices" "Polynomials" "SkewHermitianMatrices" "SkewSymmetricMatrices" "SymmetricMatrices" "TraceZeroMatrices" "TrigonometricPolynomials"

## Examples

### Basic Examples (2)

The canonical basis for the space of polynomials in x of degree 5 or less:

 In[1]:=
 Out[1]=

The canonical basis for the space of 2×3 matrices:

 In[2]:=
 Out[2]=

### Scope (6)

#### Function spaces (1)

The canonical basis for the space of trigonometric polynomials in x of degree 5 or less:

 In[3]:=
 Out[3]=

#### Matrix spaces (5)

The canonical basis for the space of 3×3 square matrices:

 In[4]:=
 Out[4]=

The canonical basis for the space of 3×3 symmetric matrices:

 In[5]:=
 Out[5]=

The canonical basis for the space of 3×3 skew-symmetric matrices:

 In[6]:=
 Out[6]=

The Hermitian matrices of given degree do not form a vector space over the complex numbers, but they do form a vector space over the real numbers:

 In[7]:=
 Out[7]=

As with Hermitian matrices, the skew-Hermitian matrices of given degree form a vector space over the real numbers:

 In[8]:=
 Out[8]=

### Applications (2)

A Manipulate illustrating an array of function-related examples:

 In[9]:=
 Out[9]=

A Manipulate illustrating an array of matrix-theoretic examples:

 In[10]:=
 Out[10]=

## Publisher

Dennis M Schneider

## Version History

• 1.0.0 – 04 October 2019