ctranspose

x'

ctranspose(x)

Try it yourself:


Transpose and conjugate matrices with ctranspose

ctranspose(x), often written x', returns the conjugate transpose of a matrix or vector. It swaps rows and columns and applies complex conjugation to every entry. For real-valued data, it has the same result as an ordinary transpose.

Why the conjugate transpose matters

Complex vector inner products use a conjugate transpose so that a vector multiplied by its own adjoint produces a real, non-negative squared length. For a complex matrix A, its adjoint is commonly written A*. Use conj when only signs of imaginary components should change, and transpose when you need only rows and columns swapped.

Examples

If a row contains [1 + i, 2 - i], ctranspose makes it a column with 1 - i and 2 + i. In linear algebra, this operation appears in Hermitian matrices, least-squares calculations, and complex signal analysis. Combine it with multiply for matrix products and dot for real-vector products.

Shape and input notes

Transpose changes an m-by-n matrix into an n-by-m matrix; check dimensions with size before multiplying. A scalar is effectively unchanged apart from conjugation. Do not use a plain transpose in a complex inner product unless you intentionally want a bilinear rather than Hermitian form.

All functions