# Transpose

The transpose AT of a matrix A can be obtained by refwecting de ewements awong its main diagonaw. Repeating de process on de transposed matrix returns de ewements to deir originaw position, uh-hah-hah-hah.

In winear awgebra, de transpose of a matrix is an operator which fwips a matrix over its diagonaw; dat is, it switches de row and cowumn indices of de matrix A by producing anoder matrix, often denoted by AT (among oder notations).[1][2]

The transpose of a matrix was introduced in 1858 by de British madematician Ardur Caywey.[3]

## Transpose of a matrix

### Definition

The transpose of a matrix A, denoted by AT,[1][4] A, A, A′,[5] Atr, tA or At, may be constructed by any one of de fowwowing medods:

1. Refwect A over its main diagonaw (which runs from top-weft to bottom-right) to obtain AT;
2. Write de rows of A as de cowumns of AT;
3. Write de cowumns of A as de rows of AT.

Formawwy, de i-f row, j-f cowumn ewement of AT is de j-f row, i-f cowumn ewement of A:

${\dispwaystywe \weft[\madbf {A} ^{\operatorname {T} }\right]_{ij}=\weft[\madbf {A} \right]_{ji}.}$

If A is an m × n matrix, den AT is an n × m matrix.

In de case of sqware matrices, AT may awso denote de Tf power of de matrix A. For avoiding a possibwe confusion, many audors use weft upperscripts, dat is, dey denote de transpose as TA. An advantage of dis notation is dat no parendeses are needed when exponents are invowved: as (TA)n = T(An), notation TAn is not ambiguous.

In dis articwe dis confusion is avoided by never using de symbow T as a variabwe name.

#### Matrix definitions invowving transposition

A sqware matrix whose transpose is eqwaw to itsewf is cawwed a symmetric matrix; dat is, A is symmetric if

${\dispwaystywe \madbf {A} ^{\operatorname {T} }=\madbf {A} .}$

A sqware matrix whose transpose is eqwaw to its negative is cawwed a skew-symmetric matrix; dat is, A is skew-symmetric if

${\dispwaystywe \madbf {A} ^{\operatorname {T} }=-\madbf {A} .}$

A sqware compwex matrix whose transpose is eqwaw to de matrix wif every entry repwaced by its compwex conjugate (denoted here wif an overwine) is cawwed a Hermitian matrix (eqwivawent to de matrix being eqwaw to its conjugate transpose); dat is, A is Hermitian if

${\dispwaystywe \madbf {A} ^{\operatorname {T} }={\overwine {\madbf {A} }}.}$

A sqware compwex matrix whose transpose is eqwaw to de negation of its compwex conjugate is cawwed a skew-Hermitian matrix; dat is, A is skew-Hermitian if

${\dispwaystywe \madbf {A} ^{\operatorname {T} }=-{\overwine {\madbf {A} }}.}$

A sqware matrix whose transpose is eqwaw to its inverse is cawwed an ordogonaw matrix; dat is, A is ordogonaw if

${\dispwaystywe \madbf {A} ^{\operatorname {T} }=\madbf {A} ^{-1}.}$

A sqware compwex matrix whose transpose is eqwaw to its conjugate inverse is cawwed a unitary matrix; dat is, A is unitary if

${\dispwaystywe \madbf {A} ^{\operatorname {T} }={\overwine {\madbf {A} ^{-1}}}.}$

### Exampwes

• ${\dispwaystywe {\begin{bmatrix}1&2\end{bmatrix}}^{\operatorname {T} }=\,{\begin{bmatrix}1\\2\end{bmatrix}}}$
• ${\dispwaystywe {\begin{bmatrix}1&2\\3&4\end{bmatrix}}^{\operatorname {T} }={\begin{bmatrix}1&3\\2&4\end{bmatrix}}}$
• ${\dispwaystywe {\begin{bmatrix}1&2\\3&4\\5&6\end{bmatrix}}^{\operatorname {T} }={\begin{bmatrix}1&3&5\\2&4&6\end{bmatrix}}}$

### Properties

Let A and B be matrices and c be a scawar.

1. ${\dispwaystywe \weft(\madbf {A} ^{\operatorname {T} }\right)^{\operatorname {T} }=\madbf {A} .}$
The operation of taking de transpose is an invowution (sewf-inverse).
2. ${\dispwaystywe \weft(\madbf {A} +\madbf {B} \right)^{\operatorname {T} }=\madbf {A} ^{\operatorname {T} }+\madbf {B} ^{\operatorname {T} }.}$
3. ${\dispwaystywe \weft(\madbf {AB} \right)^{\operatorname {T} }=\madbf {B} ^{\operatorname {T} }\madbf {A} ^{\operatorname {T} }.}$
Note dat de order of de factors reverses. From dis one can deduce dat a sqware matrix A is invertibwe if and onwy if AT is invertibwe, and in dis case we have (A−1)T = (AT)−1. By induction, dis resuwt extends to de generaw case of muwtipwe matrices, where we find dat (A1A2...Ak−1Ak)T = AkTAk−1TA2TA1T.
4. ${\dispwaystywe \weft(c\madbf {A} \right)^{\operatorname {T} }=c\madbf {A} ^{\operatorname {T} }.}$
The transpose of a scawar is de same scawar. Togeder wif (2), dis states dat de transpose is a winear map from de space of m × n matrices to de space of aww n × m matrices.
5. ${\dispwaystywe \det \weft(\madbf {A} ^{\operatorname {T} }\right)=\det(\madbf {A} ).}$
The determinant of a sqware matrix is de same as de determinant of its transpose.
6. The dot product of two cowumn vectors a and b can be computed as de singwe entry of de matrix product:
${\dispwaystywe \weft[\madbf {a} \cdot \madbf {b} \right]=\madbf {a} ^{\operatorname {T} }\madbf {b} ,}$
which is written as aibi in Einstein summation convention.
7. If A has onwy reaw entries, den ATA is a positive-semidefinite matrix.
8. ${\dispwaystywe \weft(\madbf {A} ^{\operatorname {T} }\right)^{-1}=\weft(\madbf {A} ^{-1}\right)^{\operatorname {T} }.}$
The transpose of an invertibwe matrix is awso invertibwe, and its inverse is de transpose of de inverse of de originaw matrix. The notation A−T is sometimes used to represent eider of dese eqwivawent expressions.
9. If A is a sqware matrix, den its eigenvawues are eqwaw to de eigenvawues of its transpose, since dey share de same characteristic powynomiaw.

### Products

If A is an m × n matrix and AT is its transpose, den de resuwt of matrix muwtipwication wif dese two matrices gives two sqware matrices: A AT is m × m and AT A is n × n. Furdermore, dese products are symmetric matrices. Indeed, de matrix product A AT has entries dat are de inner product of a row of A wif a cowumn of AT. But de cowumns of AT are de rows of A, so de entry corresponds to de inner product of two rows of A. If pi j is de entry of de product, it is obtained from rows i and j in A. The entry pj i is awso obtained from dese rows, dus pi j = pj i, and de product matrix (pi j) is symmetric. Simiwarwy, de product AT A is a symmetric matrix.

A qwick proof of de symmetry of A AT resuwts from de fact dat it is its own transpose:

${\dispwaystywe \weft(\madbf {A} \madbf {A} ^{\operatorname {T} }\right)^{\operatorname {T} }=\weft(\madbf {A} ^{\operatorname {T} }\right)^{\operatorname {T} }\madbf {A} ^{\operatorname {T} }=\madbf {A} \madbf {A} ^{\operatorname {T} }.}$[6]

### Impwementation of matrix transposition on computers

Iwwustration of row- and cowumn-major order

On a computer, one can often avoid expwicitwy transposing a matrix in memory by simpwy accessing de same data in a different order. For exampwe, software wibraries for winear awgebra, such as BLAS, typicawwy provide options to specify dat certain matrices are to be interpreted in transposed order to avoid de necessity of data movement.

However, dere remain a number of circumstances in which it is necessary or desirabwe to physicawwy reorder a matrix in memory to its transposed ordering. For exampwe, wif a matrix stored in row-major order, de rows of de matrix are contiguous in memory and de cowumns are discontiguous. If repeated operations need to be performed on de cowumns, for exampwe in a fast Fourier transform awgoridm, transposing de matrix in memory (to make de cowumns contiguous) may improve performance by increasing memory wocawity.

Ideawwy, one might hope to transpose a matrix wif minimaw additionaw storage. This weads to de probwem of transposing an n × m matrix in-pwace, wif O(1) additionaw storage or at most storage much wess dan mn. For n ≠ m, dis invowves a compwicated permutation of de data ewements dat is non-triviaw to impwement in-pwace. Therefore, efficient in-pwace matrix transposition has been de subject of numerous research pubwications in computer science, starting in de wate 1950s, and severaw awgoridms have been devewoped.

## Transposes of winear maps and biwinear forms

Recaww dat matrices can be pwaced into a one-to-one correspondence wif winear operators. The transpose of a winear operator can be defined widout any need to consider a matrix representation of it. This weads to a much more generaw definition of de transpose dat can be appwied to winear operators dat cannot be represented by matrices (e.g. invowving many infinite dimensionaw vector spaces).

### Transpose of a winear map

Let X# denote de awgebraic duaw space of an R-moduwe X. Let X and Y be R-moduwes. If u : XY is a winear map, den its awgebraic adjoint or duaw,[7] is de map #u : Y#X# defined by ffu. The resuwting functionaw u#(f) is cawwed de puwwback of f by u. The fowwowing rewation characterizes de awgebraic adjoint of u[8]

u#(f), x⟩ = ⟨f, u(x)⟩ for aww fY' and xX

where ⟨•, •⟩ is de naturaw pairing (i.e. defined by z, h⟩ := h(z)). This definition awso appwies unchanged to weft moduwes and to vector spaces.[9]

The definition of de transpose may be seen to be independent of any biwinear form on de moduwes, unwike de adjoint (bewow).

The continuous duaw space of a topowogicaw vector space (TVS) X is denoted by X'. If X and Y are TVSs den a winear map u : XY is weakwy continuous if and onwy if u#(Y') ⊆ X', in which case we wet tu : Y'X' denote de restriction of u# to Y'. The map tu is cawwed de transpose[10] of u.

If de matrix A describes a winear map wif respect to bases of V and W, den de matrix AT describes de transpose of dat winear map wif respect to de duaw bases.

### Transpose of a biwinear form

Every winear map to de duaw space u : XX# defines a biwinear form B : X × XF, wif de rewation B(x, y) = u(x)(y). By defining de transpose of dis biwinear form as de biwinear form tB defined by de transpose tu : X##X# i.e. tB(y, x) = tu(Ψ(y))(x), we find dat B(x, y) = tB(y, x). Here, Ψ is de naturaw homomorphism XX## into de doubwe duaw.

If de vector spaces X and Y have respectivewy nondegenerate biwinear forms BX and BY, a concept known as de adjoint, which is cwosewy rewated to de transpose, may be defined:

If u : XY is a winear map between vector spaces X and Y, we define g as de adjoint of u if g : YX satisfies

${\dispwaystywe B_{V}{\big (}x,g(y){\big )}=B_{W}{\big (}u(x),y{\big )}}$ for aww xX and yY.

These biwinear forms define an isomorphism between X and X#, and between Y and Y#, resuwting in an isomorphism between de transpose and adjoint of u. The matrix of de adjoint of a map is de transposed matrix onwy if de bases are ordonormaw wif respect to deir biwinear forms. In dis context, many audors use de term transpose to refer to de adjoint as defined here.

The adjoint awwows us to consider wheder g : YX is eqwaw to u −1 : YX. In particuwar, dis awwows de ordogonaw group over a vector space X wif a qwadratic form to be defined widout reference to matrices (nor de components dereof) as de set of aww winear maps XX for which de adjoint eqwaws de inverse.

Over a compwex vector space, one often works wif sesqwiwinear forms (conjugate-winear in one argument) instead of biwinear forms. The Hermitian adjoint of a map between such spaces is defined simiwarwy, and de matrix of de Hermitian adjoint is given by de conjugate transpose matrix if de bases are ordonormaw.

## References

1. ^ a b "Comprehensive List of Awgebra Symbows". Maf Vauwt. 2020-03-25. Retrieved 2020-09-08.
2. ^ Nykamp, Duane. "The transpose of a matrix". Maf Insight. Retrieved September 8, 2020.
3. ^ Ardur Caywey (1858) "A memoir on de deory of matrices", Phiwosophicaw Transactions of de Royaw Society of London, 148 : 17–37. The transpose (or "transposition") is defined on page 31.
4. ^ T.A. Whitewaw (1 Apriw 1991). Introduction to Linear Awgebra, 2nd edition. CRC Press. ISBN 978-0-7514-0159-2.
5. ^ Weisstein, Eric W. "Transpose". madworwd.wowfram.com. Retrieved 2020-09-08.
6. ^ Giwbert Strang (2006) Linear Awgebra and its Appwications 4f edition, page 51, Thomson Brooks/Cowe ISBN 0-03-010567-6
7. ^ Schaefer & Wowff 1999, p. 128.
8. ^ Hawmos 1974, §44
9. ^ Bourbaki 1989, II §2.5
10. ^ Trèves 2006, p. 240.