► |  | Math Library

1 | Constants and Elementary Functions
2 | Flonums
3 | Special Functions
4 | Number Theory
5 | Arbitrary-Precision Floating-Point Numbers (Bigfloats)
6 | Arrays
7 | Matrices and Linear Algebra
8 | Statistics Functions
9 | Probability Distributions
10 | Stuff That Doesn’t Belong Anywhere Else

▼ | 7 | Matrices and Linear Algebra

7.1 | Introduction
7.2 | Types, Predicates and Accessors
7.3 | Construction
7.4 | Conversion
7.5 | Entrywise Operations and Arithmetic
7.6 | Polymorphic Operations
7.7 | Basic Operations
7.8 | Inner Product Space Operations
7.9 | Solving Systems of Equations
7.10 | Row-Based Algorithms
7.11 | Orthogonal Algorithms
7.12 | Operator Norms and Comparing Matrices

On this page:

matrix-conjugate
matrix-transpose
matrix-hermitian
matrix-trace

top ← prev up next →

#### 7.7`` Basic Operations

> > procedure

> > (matrix-conjugate M) → (Matrix Number)

> M : (Matrix Number)

Returns a matrix where each entry of the given matrix is conjugated.

Example:

> > (matrix-conjugate (matrix ([1 0+1i] [-1 2+1i])))
> (array #[#[1 0-1i] #[-1 2-1i]])

Wikipedia: Transpose

> > procedure

> > (matrix-transpose M) → (Matrix A)

> M : (Matrix A)

> > procedure

> > (matrix-hermitian M) → (Matrix Number)

> M : (Matrix Number)

Wikipedia: Hermitian Returns the transpose or the hermitian of the matrix. The hermitian of a matrix is the conjugate of the transposed matrix. For a real matrix these operations return the the same result.

Examples:

> > (matrix-transpose (matrix ([1 1] [2 2] [3 3])))
> (array #[#[1 2 3] #[1 2 3]])
> > (matrix-hermitian (matrix ([1 0+1i] [2 0+2i] [3 0+3i])))
> (array #[#[1 2 3] #[0-1i 0-2i 0-3i]])

Wikipedia: Trace

> > procedure

> > (matrix-trace M) → Number

> M : (Matrix Number)

Returns the trace of the square matrix. The trace of matrix is the the sum of the diagonal entries.

Example:

> > (matrix-trace (matrix ([1 2] [3 4])))
> 5

top ← prev up next →