What is the best or most popular symbol for vector/matrix transpose? I have used simply ^T
, for example $c^T x$
. I think it is ugly, mainly because it is a little too big compared with vector variables usually denoted by lower-case characters. Can you suggest a better one?
12 Answers
It's always difficult to answer questions for "the best" or "most popular". As is mentioned, these are typically opinions. But you did say that your objection was the fact that the "T" symbol was too big. Therefore, I would recommend the \intercal
symbol to produce a "T" which isn't so big. Also, writing the vectors and matrices in bold seems, in my opinion, to make it look a little better. Try the following code:
\documentclass{article}
\usepackage{amsmath,amsfonts,amssymb}
\begin{document}
$\mathbf{A}^\intercal$\\
$\mathbf{c}^\intercal \mathbf{x}$\\
$c^T x$\\
$\mathbf{M}^\top$
\end{document}
-
28
-
9An even better to defin a new command in sense of logical markup, i.e. use
\vec
and define\newcommand{\mtrx}[1]{\mathbf{#1}}
…– TobiAug 13, 2013 at 22:32 -
23And even even better to use
\bm
instead of\mathbf
. 'Cause, you know, you never know what stupidly exotic symbol you might one day use as a matrix or vector to impress your supervisor, colleague, or yourself ;) (and in fact,\mathbf
can't even handle Greek letters which aren't that exotic after all). Jan 5, 2014 at 1:29 -
5This advice was great. To use
\bm
, just add thebm
package to the preamble of the document. Nov 12, 2015 at 13:25 -
13
The Comprehensive LaTeX Symbol List says the following:
Some people use a superscripted
\intercal
for matrix transpose:A^\intercal
. (See the May 2009 comp.text.tex thread, "raising math symbols", for suggestions about altering the height of the superscript.)\top
,T
, and\mathsf{T}
are other popular choices.
-
Thanks a lot! The book I am currently citing a formula from uses exactly what latex produces with
\mathbf{w}^\top
for a transposed vector. So I am going to go with this variant... (\intercal
would be the second choice, butT
andmathsf{T}
look ugly in my opinion) Jun 6, 2012 at 15:12 -
I agree with those who suggest \intercal It looks like the traditional T for transpose, but at the same time it is not confused with the exponents. I am using it in my Tex-files.– user37740Oct 4, 2013 at 16:45
In order to give some reference:
(DIN) EN ISO 80000-2:2013 writes it like the following.
% arara: lualatex
\documentclass{article}
\usepackage{mathtools}
\usepackage{unicode-math}
\setmathfont{XITS Math}
\newcommand*{\matr}[1]{\mathbfit{#1}}
\newcommand*{\tran}{^{\mkern-1.5mu\mathsf{T}}}
\newcommand*{\conj}[1]{\overline{#1}}
\newcommand*{\hermconj}{^{\mathsf{H}}}
\begin{document}
\[\matr{A}\tran\]
\[\matr{A}\hermconj\coloneqq(\conj{\matr{A}})\tran\]
\end{document}
The good part here is that the 'big' T visually fits to the H of the same size which might be used for the Hermitian conjugate matrix.
I prefer A^\mathsf{T}
which looks clean and is the right size.
In my opinion, the serifs in A^T
distracting, the T is set too low in A^\intercal
, the T in A^\top
is too thin and too big, and A^*
implies the presence of complex numbers.
In any case, it's always good to use a macro in case you change your mind later.
The symbol \intercal
is quite a nice symbol for transpose, but it is placed a little low. Therefore the example defines \transpose
to use a \intercal
, which is shifted to the baseline. The symbol size adapts to the current math style.
\documentclass{article}
\usepackage{amssymb}
\makeatletter
\newcommand*{\transpose}{%
{\mathpalette\@transpose{}}%
}
\newcommand*{\@transpose}[2]{%
% #1: math style
% #2: unused
\raisebox{\depth}{$\m@th#1\intercal$}%
}
\makeatother
\newcommand*{\test}[1]{%
\[
\mathbf{M}^{#1}
\;
\scriptstyle \mathbf{M}^{#1}
\;
\scriptscriptstyle \mathbf{M}^{#1}
\]
}
\begin{document}
\test{\transpose}
\test{\intercal}
\test{\mathsf{T}}
\test{\top}
\end{document}
\documentclass{article}
\usepackage{amssymb,amsmath}
\usepackage{relsize}
\begin[document}
$A^T\ A^{\mathsmaller T}$
\end{document}
Personally I often use the conjugate transpose instead. For real matrices this concept coincides with the transpose, for matrices over the complex field the conjugate is usually what you want anyway. The conjugate transpose of a matrix A
is denote A^*
.
I use the pre-exponent t in upright shape, either with mathtools package, based on the code:
\prescript{\mathrm t}{}{A}
, or using the \ltrans
command from leftidx
package.
Here is a code that tries to take into account different situations, which involve different math kerning, nested transpose, and so on. I define a \transp
command, with an optional argument, the math kerning (defaults to -3mu
) between the t prescript and the ‘prescripted’ expression that follows.
\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\newcommand*{\transp}[2][-3mu]{\ensuremath{\mskip1mu\prescript{\smash{\mathrm t\mkern#1}}{}{\mathstrut#2}}}%
\begin{document}
Matrix transposition has the following properties :
\begin{align*}
\transp{(\mskip-1mu AB)} & = \transp{B}\transp{A} \\
\transp{(\transp{A})} & = A \\
\transp{(\mathrm N + \mathrm P)} & = \transp[0mu]{\mathrm N} +\transp[0mu]{\mathrm P}
\end{align*}
\end{document}
-
3
-
It is the first time I see the transpose as a presuperscript. Did you see it before. It is an interesting idea though to separate exponentiation and transposition (which commute for matrices).– alfCDec 31, 2013 at 23:33
-
4@alfC: It's a traditional notation in French mathematical typography. Not the only one: there's also t or T as superscripts, but always in
upright
shape.– BernardOct 7, 2014 at 11:51 -
@Sean Alfred: I had forgotten to add a full example. This is done now, and the code has been modified.– BernardOct 7, 2014 at 12:59
Conjugate transpose is in physics often denoted by ^\dagger
because of its association with adjoint operators.
There are some good suggestions regarding which symbol to use, it is a good idea to define your own macros for indicating matrices, vectors, and transpose, so that you can write:
\MAT A \VEC b^\TRANSPOSE
This will make it easy to change the notation in the future, if you ever need to do so. In addition, the source is more readable than \mathbf A \mathbf b^\intercal
etc.
maybe you could use $\mathbf{C}^{^\mathrm{T}}$
to raise it a smaller transpose T
M^\top
. (For orthocomplements of vector spaces, I similarly useV^\bot
.) UsingT
ort
as a superscript is problematic in disciplines where they are modestly likely to occur as an actual variable, especially one which might occur in an exponent. I choose\top
and\bot
because they are more obviously abstract symbols, and not variables.\newcommand{\transpose}[1]{\ensuremath{#1^{\scriptscriptstyle T}}}
and use\transpose{c}
. But, size isn't everything...