Math & ScienceTrace of a Matrix

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Trace of a Matrix

Post by Cham »

Apparently, there isn't a built-in command for the matrix trace operation, while there is one for the determinant (\det). I need to confirm this, and what are you doing to write a trace?

Currently, I'm using \mathrm{Tr}, but I frequently have to add some small space if there are some parenthesis or with a small space \mathrm{Tr}\hspace{1pt}.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

Trace of a Matrix

Post by Stefan Kottwitz »

Hi Cham,

I would use \DeclareMathOperator{\Tr}{Tr} together with amsmath.


Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Re: Trace of a Matrix

Post by Cham »

Perfect !

Thanks Stefan ! :)
Post Reply