On this page:
matrix-conjugate
matrix-transpose
matrix-hermitian
matrix-trace

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]])

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]])

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