# transpose() Function & Examples

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

## transpose

#### x'

#### transpose(x)

Try it yourself:

```calculio
a = [1, 2, 3; 4, 5, 6]
a'
transpose(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(): swap matrix rows and columns

**transpose(A)** turns rows into columns. A matrix with shape m×n becomes n×m.

## Example

The transpose of [[1,2,3],[4,5,6]] is [[1,4],[2,5],[3,6]]. It is central to dot products, covariance, and matrix factorization.

## Related functions

Use [multiply()](https://calcul.io/function/multiply/index.md) for matrix products, [trace()](https://calcul.io/function/trace/index.md) for diagonal sums, [inv()](https://calcul.io/function/inv/index.md) for inverses, and [svd()](https://calcul.io/function/svd/index.md) for decomposition. [size()](https://calcul.io/function/size/index.md) verifies the changed shape.

## Caveat

Transpose does not conjugate complex entries; use a conjugate-transpose operation when that is required.

[All functions](https://calcul.io/functions/index.md)
