{
  "id": "matrix-transpose",
  "title": "Matrix Transpose",
  "lang": "en",
  "source_lang": "en",
  "summary": "The transpose of a matrix exchanges its rows and columns, connecting matrix operations with duality, inner products, symmetry, and least-squares methods.",
  "category": "mathematics",
  "subcategory": "algebra",
  "type": "concept",
  "aliases": [
    "Transpose of a matrix",
    "Transposed matrix"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/matrix-transpose/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/matrix-transpose/",
      "json": "https://aiwiki.page/zh/matrix-transpose.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The matrix transpose is the operation that exchanges the rows and columns of a matrix. If \\(A\\) has \\(m\\) rows and \\(n\\) columns, its transpose, written \\(A^{\\mathsf T}\\), has \\(n\\) rows and \\(m\\) columns. Each entry retains its value but exchanges its two indices. Transposition is a fundamental operation in linear algebra, used to express symmetry, relationships between vectors, and properties of matrix products. (ocw.mit.edu)"
    },
    {
      "heading": "Definition and notation",
      "text": "For a matrix \\(A=(a_{ij})\\) over a field, the transpose is defined by\n\n\\[(A^{\\mathsf T})_{ij}=a_{ji}.\\]\n\nThus, the first row of \\(A\\) becomes the first column of \\(A^{\\mathsf T}\\), and similarly for every other row. For example,\n\n\\[A= \\begin{pmatrix} 1&2&3\\\\ 4&5&6 \\end{pmatrix}, \\qquad A^{\\mathsf T}= \\begin{pmatrix} 1&4\\\\ 2&5\\\\ 3&6 \\end{pmatrix}.\\]\n\nFor a square matrix, this rearrangement can be visualized as reflection across the main diagonal; diagonal entries remain fixed. A column vector becomes a row vector, and conversely. Common notations include \\(A^T\\), \\(A^{\\mathsf T}\\), and \\(A^\\top\\). (ocw.mit.edu)\n\nTransposition should not be confused with finding an inverse matrix. Every matrix has a transpose, including rectangular and singular matrices. An inverse, in the usual sense, exists only for an invertible square matrix. (ocw.mit.edu)"
    },
    {
      "heading": "Algebraic properties",
      "text": "For matrices of compatible dimensions and a scalar \\(c\\), transposition satisfies\n\n\\[(A^{\\mathsf T})^{\\mathsf T}=A,\\qquad (A+B)^{\\mathsf T}=A^{\\mathsf T}+B^{\\mathsf T},\\]\n\n\\[(cA)^{\\mathsf T}=cA^{\\mathsf T},\\qquad (AB)^{\\mathsf T}=B^{\\mathsf T}A^{\\mathsf T}.\\]\n\nThe first identity makes transposition an involution: applying it twice restores the original matrix. The product identity reverses the order of the factors, an essential distinction because matrix multiplication generally does not commute. (ocw.mit.edu)\n\nThe product rule follows directly from the entry formula:\n\n\\[[(AB)^{\\mathsf T}]_{ij} =\\sum_k a_{jk}b_{ki} =\\sum_k(B^{\\mathsf T})_{ik}(A^{\\mathsf T})_{kj}.\\]\n\nFor invertible \\(A\\),\n\n\\[(A^{\\mathsf T})^{-1}=(A^{-1})^{\\mathsf T}.\\]\n\nA square matrix and its transpose also have the same determinant. (ocw.mit.edu)\n\nTransposition preserves matrix rank: exchanging rows and columns interchanges row rank and column rank, which are equal. It also preserves the trace, because the diagonal entries do not move. Consequently, \\(A\\) and \\(A^{\\mathsf T}\\) have the same characteristic polynomial and the same eigenvalues, including their algebraic multiplicities, although their eigenvectors need not coincide. (github.com)"
    },
    {
      "heading": "Duality and inner products",
      "text": "The transpose has a basis-independent interpretation through dual spaces. If \\(T:V\\to W\\) is a linear map between finite-dimensional vector spaces, it induces a map\n\n\\[T^\\vee:W^*\\to V^*,\\qquad T^\\vee(\\varphi)=\\varphi\\circ T.\\]\n\nThis map pulls a linear functional on \\(W\\) back to one on \\(V\\). If \\(A\\) represents \\(T\\) relative to chosen bases, then \\(A^{\\mathsf T}\\) represents \\(T^\\vee\\) relative to the corresponding dual bases. The reversal of direction explains the reversed dimensions and multiplication order. (ocw.mit.edu)\n\nFor matrices with real entries, the transpose also expresses the standard Euclidean inner product:\n\n\\[\\langle Ax,y\\rangle=\\langle x,A^{\\mathsf T}y\\rangle.\\]\n\nHere \\(x\\in\\mathbb R^n\\) and \\(y\\in\\mathbb R^m\\). This identity characterizes \\(A^{\\mathsf T}\\) as the adjoint of \\(A\\) for these inner products; with arbitrary inner products or nonorthonormal bases, the adjoint’s matrix need not be the ordinary transpose. (math.brown.edu)"
    },
    {
      "heading": "Symmetry and complex matrices",
      "text": "A square matrix is symmetric when \\(A^{\\mathsf T}=A\\), and skew-symmetric when \\(A^{\\mathsf T}=-A\\). Over the real numbers, skew-symmetric matrices have zero diagonal entries. Every real square matrix has the unique decomposition\n\n\\[A=\\frac{A+A^{\\mathsf T}}2+\\frac{A-A^{\\mathsf T}}2,\\]\n\ninto symmetric and skew-symmetric parts. (ocw.mit.edu)\n\nA real orthogonal matrix satisfies\n\n\\[Q^{\\mathsf T}Q=I,\\]\n\nwhere \\(I\\) is the identity matrix; therefore \\(Q^{-1}=Q^{\\mathsf T}\\). Real symmetric matrices can be diagonalized using an orthonormal basis, as described by the spectral theorem. (ocw.mit.edu)\n\nFor matrices containing complex numbers, ordinary transposition does not conjugate the entries. The conjugate transpose, written \\(A^*\\) or \\(A^{\\mathrm H}\\), instead satisfies\n\n\\[A^*=\\overline A^{\\mathsf T}.\\]\n\nIt is the adjoint for standard complex inner products. Accordingly, Hermitian matrices satisfy \\(A^*=A\\), rather than necessarily \\(A^{\\mathsf T}=A\\). (math.brown.edu)"
    },
    {
      "heading": "Applications and computation",
      "text": "For a real matrix \\(X\\), the Gram matrix \\(X^{\\mathsf T}X\\) contains inner products between columns. It is symmetric and positive semidefinite because\n\n\\[z^{\\mathsf T}X^{\\mathsf T}Xz=\\|Xz\\|^2\\geq0.\\]\n\nIn ordinary least squares, including linear regression, minimizing \\(\\|X\\beta-y\\|^2\\) yields the normal equations\n\n\\[X^{\\mathsf T}X\\hat\\beta=X^{\\mathsf T}y.\\]\n\nThe solution is unique when \\(X\\) has linearly independent columns. Geometrically, these equations state that the residual is orthogonal to every column of \\(X\\). (ocw.mit.edu)\n\nSoftware distinguishes mathematical transposition from physically rearranging stored entries. NumPy’s transpose operation can return a view sharing the original data rather than a copied array. For multidimensional arrays, it permutes axes; matrix transposition is the two-axis case. A one-dimensional array has no separate row and column axes, so transposing it leaves its shape unchanged. Representing it as a column or row therefore requires an additional axis. (numpy.org)"
    }
  ],
  "links": [
    "matrix",
    "linear-algebra",
    "field-mathematics",
    "inverse-matrix",
    "determinant",
    "matrix-rank",
    "matrix-trace",
    "characteristic-polynomial",
    "eigenvalues-and-eigenvectors",
    "dual-space",
    "linear-map",
    "vector-space",
    "basis-linear-algebra",
    "real-number",
    "inner-product",
    "symmetric-matrix",
    "skew-symmetric-matrix",
    "orthogonal-matrix",
    "identity-matrix",
    "spectral-theorem",
    "complex-number",
    "conjugate-transpose",
    "gram-matrix",
    "ordinary-least-squares",
    "linear-regression"
  ],
  "sources": [
    {
      "title": "ocw.mit.edu/courses/2-086-numerical-computation-for-mechanical-engineers-fall-2…",
      "url": "https://ocw.mit.edu/courses/2-086-numerical-computation-for-mechanical-engineers-fall-2012/016e58e13c5fca3e088ff3585eb4ca6b_MIT2_086F12_notes_unit3.pdf"
    },
    {
      "title": "github.com/mitmath/1806",
      "url": "https://github.com/mitmath/1806"
    },
    {
      "title": "ocw.mit.edu/courses/18-101-analysis-ii-fall-2005/9743fac5e8a674c78af0364a14b62c…",
      "url": "https://ocw.mit.edu/courses/18-101-analysis-ii-fall-2005/9743fac5e8a674c78af0364a14b62ca6_lecture16.pdf"
    },
    {
      "title": "math.brown.edu/streil/papers/LADW/HTML_2026_08-31/Ch5.html",
      "url": "https://www.math.brown.edu/streil/papers/LADW/HTML_2026_08-31/Ch5.html"
    },
    {
      "title": "ocw.mit.edu/ans7870/18/18.013a/textbook/chapter32/section06.html",
      "url": "https://ocw.mit.edu/ans7870/18/18.013a/textbook/chapter32/section06.html"
    },
    {
      "title": "ocw.mit.edu/courses/18-085-computational-science-and-engineering-i-fall-2008/f9…",
      "url": "https://ocw.mit.edu/courses/18-085-computational-science-and-engineering-i-fall-2008/f974adb21cc67c63c7f0a3054959ff30_18-085F08-L10.pdf"
    },
    {
      "title": "numpy.org/doc/stable/reference/generated/numpy.transpose.html",
      "url": "https://numpy.org/doc/stable/reference/generated/numpy.transpose.html?highlight=axis"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}