# ctranspose() Function & Examples

Use the ctranspose() matrix function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## ctranspose

#### x'

#### ctranspose(x)

Try it yourself:

```calculio
a = [1, 2, 3; 4, 5, 6]
a'
ctranspose(a)
```

[concat](https://calcul.io/function/concat/index.md)

[det](https://calcul.io/function/det/index.md)

[diag](https://calcul.io/function/diag/index.md)

[identity](https://calcul.io/function/identity/index.md)

[inv](https://calcul.io/function/inv/index.md)

[ones](https://calcul.io/function/ones/index.md)

[range](https://calcul.io/function/range/index.md)

[size](https://calcul.io/function/size/index.md)

[squeeze](https://calcul.io/function/squeeze/index.md)

[subset](https://calcul.io/function/subset/index.md)

[trace](https://calcul.io/function/trace/index.md)

[zeros](https://calcul.io/function/zeros/index.md)

---

## 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](https://calcul.io/function/conj/index.md) when only signs of imaginary components should change, and [transpose](https://calcul.io/function/transpose/index.md) 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](https://calcul.io/function/multiply/index.md) for matrix products and [dot](https://calcul.io/function/dot/index.md) 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](https://calcul.io/function/size/index.md) 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](https://calcul.io/functions/index.md)
