Transpose
{{Short description|Matrix operation which flips a matrix over its diagonal}}
{{about|the transpose of matrices and linear operators||Transposition (disambiguation)}}
In linear algebra, the transpose of a matrix is an operator which flips a matrix over its diagonal;
that is, it switches the row and column indices of the matrix {{math|A}} by producing another matrix, often denoted by {{math|AT}} (among other notations).{{Cite web|last=Nykamp|first=Duane|title=The transpose of a matrix|url=https://mathinsight.org/matrix_transpose|access-date=September 8, 2020|website=Math Insight}}
The transpose of a matrix was introduced in 1858 by the British mathematician Arthur Cayley.Arthur Cayley (1858) [https://books.google.com/books?id=flFFAAAAcAAJ&pg=PA31 "A memoir on the theory of matrices"], Philosophical Transactions of the Royal Society of London, 148 : 17–37. The transpose (or "transposition") is defined on page 31.
Transpose of a matrix
{{hatnote|This article assumes that matrices are taken over a commutative ring. These results may not hold in the non-commutative case.}}
= Definition =
The transpose of a matrix {{math|A}}, denoted by {{math|AT}},{{cite book|author=T.A. Whitelaw|title=Introduction to Linear Algebra, 2nd edition|url=https://books.google.com/books?id=6M_kDzA7-qIC&q=transpose|date=1 April 1991|publisher=CRC Press|isbn=978-0-7514-0159-2}} {{math|{{sup|⊤}}A}}, {{math|A{{sup|⊤}}}}, ,{{Cite web|last=|first=|date=|title=Transpose of a Matrix Product (ProofWiki)|url=https://proofwiki.org/wiki/Transpose_of_Matrix_Product|archive-url=|archive-date=|access-date=4 Feb 2021|website=ProofWiki}}{{Cite web|date=|title=What is the best symbol for vector/matrix transpose?|url=https://tex.stackexchange.com/questions/30619/what-is-the-best-symbol-for-vector-matrix-transpose|archive-url=|archive-date=|access-date=4 Feb 2021|website=Stack Exchange}} {{math|A′}},{{Cite web|last=Weisstein|first=Eric W.|title=Transpose|url=https://mathworld.wolfram.com/Transpose.html|access-date=2020-09-08|website=mathworld.wolfram.com|language=en}} {{math|Atr}}, {{math|tA}} or {{math|At}}, may be constructed by any one of the following methods:
- Reflect {{math|A}} over its main diagonal (which runs from top-left to bottom-right) to obtain {{math|AT}}
- Write the rows of {{math|A}} as the columns of {{math|AT}}
- Write the columns of {{math|A}} as the rows of {{math|AT}}
Formally, the {{mvar|i}}-th row, {{mvar|j}}-th column element of {{math|AT}} is the {{mvar|j}}-th row, {{mvar|i}}-th column element of {{math|A}}:
:
If {{math|A}} is an {{math|{{nowrap|m × n}}}} matrix, then {{math|AT}} is an {{math|{{nowrap|n × m}}}} matrix.
In the case of square matrices, {{math|AT}} may also denote the {{math|T}}th power of the matrix {{math|A}}. For avoiding a possible confusion, many authors use left upperscripts, that is, they denote the transpose as {{math|TA}}. An advantage of this notation is that no parentheses are needed when exponents are involved: as {{math|1=({{sup|T}}A){{sup|n}} = {{sup|T}}(A{{sup|n}})}}, notation {{math|{{sup|T}}A{{sup|n}}}} is not ambiguous.
In this article, this confusion is avoided by never using the symbol {{math|T}} as a variable name.
== Matrix definitions involving transposition ==
A square matrix whose transpose is equal to itself is called a symmetric matrix; that is, {{math|A}} is symmetric if
:
A square matrix whose transpose is equal to its negative is called a skew-symmetric matrix; that is, {{math|A}} is skew-symmetric if
:
A square complex matrix whose transpose is equal to the matrix with every entry replaced by its complex conjugate (denoted here with an overline) is called a Hermitian matrix (equivalent to the matrix being equal to its conjugate transpose); that is, {{math|A}} is Hermitian if
:
A square complex matrix whose transpose is equal to the negation of its complex conjugate is called a skew-Hermitian matrix; that is, {{math|A}} is skew-Hermitian if
:
A square matrix whose transpose is equal to its inverse is called an orthogonal matrix; that is, {{math|A}} is orthogonal if
:
A square complex matrix whose transpose is equal to its conjugate inverse is called a unitary matrix; that is, {{math|A}} is unitary if
:
= Examples =
1 & 2
\end{bmatrix}^{\operatorname{T}}
= \,
\begin{bmatrix}
1 \\
2
\end{bmatrix}
\begin{bmatrix}
1 & 2 \\
3 & 4
\end{bmatrix}^{\operatorname{T}}
=
\begin{bmatrix}
1 & 3 \\
2 & 4
\end{bmatrix}
\begin{bmatrix}
1 & 2 \\
3 & 4 \\
5 & 6
\end{bmatrix}^{\operatorname{T}}
=
\begin{bmatrix}
1 & 3 & 5\\
2 & 4 & 6
\end{bmatrix}
= Properties =
Let {{math|A}} and {{math|B}} be matrices and {{mvar|c}} be a scalar.
- :The operation of taking the transpose is an involution (self-inverse).
- :The transpose respects addition.
- :The transpose of a scalar is the same scalar. Together with the preceding property, this implies that the transpose is a linear map from the space of {{math|{{nowrap|m × n}}}} matrices to the space of the {{math|{{nowrap|n × m}}}} matrices.
- :The order of the factors reverses. By induction, this result extends to the general case of multiple matrices, so
- ::{{math|(A1A2...Ak−1Ak)T {{=}} AkTAk−1T…A2TA1T}}.
- :The determinant of a square matrix is the same as the determinant of its transpose.
- The dot product of two column vectors {{math|a}} and {{math|b}} can be computed as the single entry of the matrix product
- If {{math|A}} has only real entries, then {{math|ATA}} is a positive-semidefinite matrix.
- : The transpose of an invertible matrix is also invertible, and its inverse is the transpose of the inverse of the original matrix.
The notation {{math|A−T}} is sometimes used to represent either of these equivalent expressions. - If {{math|A}} is a square matrix, then its eigenvalues are equal to the eigenvalues of its transpose, since they share the same characteristic polynomial.
- for two column vectors and the standard dot product.
- Over any field , a square matrix is similar to .
- :This implies that and have the same invariant factors, which implies they share the same minimal polynomial, characteristic polynomial, and eigenvalues, among other properties.
- :A proof of this property uses the following two observations.
- :* Let and be matrices over some base field and let be a field extension of . If and are similar as matrices over , then they are similar over . In particular this applies when is the algebraic closure of .
- :*If is a matrix over an algebraically closed field in Jordan normal form with respect to some basis, then is similar to . This further reduces to proving the same fact when is a single Jordan block, which is a straightforward exercise.
= Products =
If {{math|A}} is an {{math|{{nowrap|m × n}}}} matrix and {{math|AT}} is its transpose, then the result of matrix multiplication with these two matrices gives two square matrices: {{math|A AT}} is {{math|{{nowrap|m × m}}}} and {{math|AT A}} is {{math|{{nowrap|n × n}}}}. Furthermore, these products are symmetric matrices. Indeed, the matrix product {{math|A AT}} has entries that are the inner product of a row of {{math|A}} with a column of {{math|AT}}. But the columns of {{math|AT}} are the rows of {{math|A}}, so the entry corresponds to the inner product of two rows of {{math|A}}. If {{mvar|pi j}} is the entry of the product, it is obtained from rows {{mvar|i}} and {{mvar|j}} in {{math|A}}. The entry {{mvar|pj i}} is also obtained from these rows, thus {{math|pi j {{=}} pj i}}, and the product matrix ({{mvar|pi j}}) is symmetric. Similarly, the product {{math|AT A}} is a symmetric matrix.
A quick proof of the symmetry of {{math|A AT}} results from the fact that it is its own transpose:
:Gilbert Strang (2006) Linear Algebra and its Applications 4th edition, page 51, Thomson Brooks/Cole {{ISBN|0-03-010567-6}}
= Implementation of matrix transposition on computers =
{{See also|In-place matrix transposition}}
File:Row_and_column_major_order.svg ]]
On a computer, one can often avoid explicitly transposing a matrix in memory by simply accessing the same data in a different order. For example, software libraries for linear algebra, such as BLAS, typically provide options to specify that certain matrices are to be interpreted in transposed order to avoid the necessity of data movement.
However, there remain a number of circumstances in which it is necessary or desirable to physically reorder a matrix in memory to its transposed ordering. For example, with a matrix stored in row-major order, the rows of the matrix are contiguous in memory and the columns are discontiguous. If repeated operations need to be performed on the columns, for example in a fast Fourier transform algorithm, transposing the matrix in memory (to make the columns contiguous) may improve performance by increasing memory locality.
Ideally, one might hope to transpose a matrix with minimal additional storage. This leads to the problem of transposing an n × m matrix in-place, with O(1) additional storage or at most storage much less than mn. For n ≠ m, this involves a complicated permutation of the data elements that is non-trivial to implement in-place. Therefore, efficient in-place matrix transposition has been the subject of numerous research publications in computer science, starting in the late 1950s, and several algorithms have been developed.
Transposes of linear maps and bilinear forms
{{See also|Transpose of a linear map}}
As the main use of matrices is to represent linear maps between finite-dimensional vector spaces, the transpose is an operation on matrices that may be seen as the representation of some operation on linear maps.
This leads to a much more general definition of the transpose that works on every linear map, even when linear maps cannot be represented by matrices (such as in the case of infinite dimensional vector spaces). In the finite dimensional case, the matrix representing the transpose of a linear map is the transpose of the matrix representing the linear map, independently of the basis choice.
= Transpose of a linear map =
{{Main|Transpose of a linear map}}
Let {{math|X#}} denote the algebraic dual space of an {{mvar|R}}-module {{mvar|X}}.
Let {{mvar|X}} and {{mvar|Y}} be {{mvar|R}}-modules.
If {{math|u : X → Y}} is a linear map, then its algebraic adjoint or dual,{{sfn | Schaefer | Wolff | 1999 | p=128}} is the map {{math|u# : Y# → X#}} defined by {{math|f {{mapsto}} f ∘ u}}.
The resulting functional {{math|u#(f)}} is called the pullback of {{mvar|f}} by {{mvar|u}}.
The following relation characterizes the algebraic adjoint of {{mvar|u}}{{harvnb|Halmos|1974|loc=§44}}
:{{math|{{angbr|u#(f), x}} {{=}} {{angbr|f, u(x)}}}} for all {{math|f ∈ Y#}} and {{math|x ∈ X}}
where {{math|{{angbr|•, •}}}} is the natural pairing (i.e. defined by {{math|{{angbr|h, z}} :{{=}} h(z)}}).
This definition also applies unchanged to left modules and to vector spaces.{{harvnb|Bourbaki|1989|loc=II §2.5 }}
The definition of the transpose may be seen to be independent of any bilinear form on the modules, unlike the adjoint (below).
The continuous dual space of a topological vector space (TVS) {{mvar|X}} is denoted by {{math|X{{big|{{'}}}}}}.
If {{mvar|X}} and {{mvar|Y}} are TVSs then a linear map {{math|u : X → Y}} is weakly continuous if and only if {{math|u#(Y{{big|{{'}}}}) ⊆ X{{big|{{'}}}}}}, in which case we let {{math|tu : Y{{big|{{'}}}} → X{{big|{{'}}}}}} denote the restriction of {{math|u#}} to {{math|Y{{big|{{'}}}}}}.
The map {{math|tu}} is called the transpose{{sfn | Trèves | 2006 | p=240}} of {{mvar|u}}.
If the matrix {{math|A}} describes a linear map with respect to bases of {{mvar|V}} and {{mvar|W}}, then the matrix {{math|AT}} describes the transpose of that linear map with respect to the dual bases.
= Transpose of a bilinear form =
{{main|Bilinear form}}
Every linear map to the dual space {{math|u : X → X#}} defines a bilinear form {{math|B : X × X → F}}, with the relation {{math|B(x, y) {{=}} u(x)(y)}}.
By defining the transpose of this bilinear form as the bilinear form {{mvar|tB}} defined by the transpose {{math|tu : X## → X#}} i.e. {{math|tB(y, x) {{=}} tu(Ψ(y))(x)}}, we find that {{math|B(x, y) {{=}} tB(y, x)}}.
Here, {{mvar|Ψ}} is the natural homomorphism {{math|X → X##}} into the double dual.
= Adjoint =
{{distinguish|Hermitian adjoint}}
If the vector spaces {{mvar|X}} and {{mvar|Y}} have respectively nondegenerate bilinear forms {{math|BX}} and {{math|BY}}, a concept known as the adjoint, which is closely related to the transpose, may be defined:
If {{nowrap|{{math|u : X → Y}}}} is a linear map between vector spaces {{mvar|X}} and {{mvar|Y}}, we define {{mvar|g}} as the adjoint of {{mvar|u}} if {{nowrap|{{math|g : Y → X}}}} satisfies
: for all {{math|x ∈ X}} and {{math|y ∈ Y}}.
These bilinear forms define an isomorphism between {{mvar|X}} and {{math|X#}}, and between {{mvar|Y}} and {{math|Y#}}, resulting in an isomorphism between the transpose and adjoint of {{mvar|u}}.
The matrix of the adjoint of a map is the transposed matrix only if the bases are orthonormal with respect to their bilinear forms.
In this context, many authors however, use the term transpose to refer to the adjoint as defined here.
The adjoint allows us to consider whether {{nowrap|{{math|g : Y → X}}}} is equal to {{nowrap|{{math|u −1 : Y → X}}}}.
In particular, this allows the orthogonal group over a vector space {{mvar|X}} with a quadratic form to be defined without reference to matrices (nor the components thereof) as the set of all linear maps {{nowrap|{{math|X → X}}}} for which the adjoint equals the inverse.
Over a complex vector space, one often works with sesquilinear forms (conjugate-linear in one argument) instead of bilinear forms.
The Hermitian adjoint of a map between such spaces is defined similarly, and the matrix of the Hermitian adjoint is given by the conjugate transpose matrix if the bases are orthonormal.
See also
References
{{reflist}}
Further reading
- {{Bourbaki Algebra I Chapters 1-3 Springer}}
- {{citation|first=Paul|last=Halmos|author-link=Paul Halmos|title=Finite dimensional vector spaces|publisher=Springer|year=1974|isbn=978-0-387-90093-3}}.
- {{cite book |first=Jared M. |last=Maruskin |title=Essential Linear Algebra |location=San José |publisher=Solar Crest |year=2012 |isbn=978-0-9850627-3-6 |url={{Google books |plainurl=yes |id=aOF3-hx3u1kC |page=122 }} |pages=122–132 }}
- {{Schaefer Wolff Topological Vector Spaces|edition=2}}
- {{Trèves François Topological vector spaces, distributions and kernels}}
- {{cite book |first=Jacob T. |last=Schwartz |title=Introduction to Matrices and Vectors |location=Mineola |publisher=Dover |year=2001 |isbn=0-486-42000-0 |url={{Google books |plainurl=yes |id=fMG3y1z9Jw0C |page=126}} |pages=126–132 }}
External links
- Gilbert Strang (Spring 2010) [https://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/ Linear Algebra] from MIT Open Courseware
{{linear algebra}}
{{Tensors}}