Skip to contents

Computes the trace inner product of two matrices A and B.

Usage

trdot(A, B)

Arguments

A, B

square matrices.

Value

The trace inner product on \(Mat_{n\ x\ n}(\mathbb{C})\) is defined as

$$\langle A, B \rangle := tr(A^*B)$$

See also

Examples

A <- rbind(1:5, 2:6, 3:7)
B <- rbind(7:11, 8:12, 9:13)

# Compute the trace inner product of A and B
trdot(A, B)
#> [1] 640