# Difference between revisions of "Commutant"

Jump to navigation
Jump to search

m (removed red links) |
|||

(3 intermediate revisions by the same user not shown) | |||

Line 1: | Line 1: | ||

{{Function | {{Function | ||

|name=Commutant | |name=Commutant | ||

− | |desc=Computes the | + | |desc=Computes the commutant of a set of matrices |

− | | | + | |cat=[[List of functions#Miscellaneous|Miscellaneous]] |

− | |upd=November | + | |upd=November 12, 2014 |

− | |v= | + | |v=0.50}} |

− | <tt>'''Commutant'''</tt> is a [[List of functions|function]] that computes an orthonormal basis (in the | + | <tt>'''Commutant'''</tt> is a [[List of functions|function]] that computes an orthonormal basis (in the Hilbert-Schmidt inner product) of the commutant of a matrix or set of matrices. |

==Syntax== | ==Syntax== | ||

Line 16: | Line 16: | ||

===A single matrix=== | ===A single matrix=== | ||

Everything commutes with the identity matrix, which we can verify in the 2-dimensional case as follows: | Everything commutes with the identity matrix, which we can verify in the 2-dimensional case as follows: | ||

− | < | + | <syntaxhighlight> |

>> C = Commutant(eye(2)); | >> C = Commutant(eye(2)); | ||

>> celldisp(C) % display the contents of C | >> celldisp(C) % display the contents of C | ||

Line 35: | Line 35: | ||

0 0 | 0 0 | ||

0 1 | 0 1 | ||

− | </ | + | </syntaxhighlight> |

===Bicommutant=== | ===Bicommutant=== | ||

If <tt>A</tt> is a cell that contains a basis of a unital, self-adjoint algebra, then its [http://en.wikipedia.org/wiki/Bicommutant bicommutant] spans the same set, by the [http://en.wikipedia.org/wiki/Von_Neumann_bicommutant_theorem von Neumann bicommutant theorem]. The following code verifies this in the case of the subalgebra $M_2 \oplus M_1 \subseteq M_3$: | If <tt>A</tt> is a cell that contains a basis of a unital, self-adjoint algebra, then its [http://en.wikipedia.org/wiki/Bicommutant bicommutant] spans the same set, by the [http://en.wikipedia.org/wiki/Von_Neumann_bicommutant_theorem von Neumann bicommutant theorem]. The following code verifies this in the case of the subalgebra $M_2 \oplus M_1 \subseteq M_3$: | ||

− | < | + | <syntaxhighlight> |

>> A = {[1 0 0;0 0 0;0 0 0] [0 1 0;0 0 0;0 0 0] [0 0 0;1 0 0;0 0 0] [0 0 0;0 1 0;0 0 0] [0 0 0;0 0 0;0 0 1]}; | >> A = {[1 0 0;0 0 0;0 0 0] [0 1 0;0 0 0;0 0 0] [0 0 0;1 0 0;0 0 0] [0 0 0;0 1 0;0 0 0] [0 0 0;0 0 0;0 0 1]}; | ||

>> B = Commutant(Commutant(A)); | >> B = Commutant(Commutant(A)); | ||

Line 68: | Line 68: | ||

0 0 0 | 0 0 0 | ||

0 0 1 | 0 0 1 | ||

− | </ | + | </syntaxhighlight> |

Note that the basis output for the bicommutant in general may be different than the basis provided as input. | Note that the basis output for the bicommutant in general may be different than the basis provided as input. | ||

+ | |||

+ | {{SourceCode|name=Commutant}} |

## Latest revision as of 18:04, 19 December 2014

Commutant | |

Computes the commutant of a set of matrices | |

Other toolboxes required | none |
---|---|

Function category | Miscellaneous |

` Commutant` is a function that computes an orthonormal basis (in the Hilbert-Schmidt inner product) of the commutant of a matrix or set of matrices.

## Syntax

`C = Commutant(A)`

## Argument descriptions

`A`: Either a matrix, or a cell containing one or more matrices of the same size.

## Examples

### A single matrix

Everything commutes with the identity matrix, which we can verify in the 2-dimensional case as follows:

```
>> C = Commutant(eye(2));
>> celldisp(C) % display the contents of C
C{1} =
1 0
0 0
C{2} =
0 1
0 0
C{3} =
0 0
1 0
C{4} =
0 0
0 1
```

### Bicommutant

If `A` is a cell that contains a basis of a unital, self-adjoint algebra, then its bicommutant spans the same set, by the von Neumann bicommutant theorem. The following code verifies this in the case of the subalgebra $M_2 \oplus M_1 \subseteq M_3$:

```
>> A = {[1 0 0;0 0 0;0 0 0] [0 1 0;0 0 0;0 0 0] [0 0 0;1 0 0;0 0 0] [0 0 0;0 1 0;0 0 0] [0 0 0;0 0 0;0 0 1]};
>> B = Commutant(Commutant(A));
>> celldisp(B)
B{1} =
1 0 0
0 0 0
0 0 0
B{2} =
0 1 0
0 0 0
0 0 0
B{3} =
0 0 0
1 0 0
0 0 0
B{4} =
0 0 0
0 1 0
0 0 0
B{5} =
0 0 0
0 0 0
0 0 1
```

Note that the basis output for the bicommutant in general may be different than the basis provided as input.

## Source code

Click on "expand" to the right to view the MATLAB source code for this function.