Rank in LaTeX (\text{rank}(A))

rank(A)\text{rank}(A)
LaTeX command
\text{rank}(A)
Package
Add to your preamble:\usepackage{amsmath}
Mode
Text and math mode

Where it is used

Rank of A: the dimension of its column space, written with an upright label.

The rank-nullity theorem reads \operatorname{rank}(A) + \operatorname{nullity}(A) = n, and a square matrix is invertible exactly when its rank is full. \text{rank} gives upright letters, but a theorem environment's italics can leak into it and it has no operator spacing. Prefer \operatorname{rank}(A), or declare \DeclareMathOperator{\rank}{rank} once and write \rank A. There is no built-in \rank command, so typing it without a definition causes an undefined control sequence error. Low-rank approximation via the truncated SVD is a common place you will typeset this.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

rank(A)+dim⁡ker⁡(A)=n\text{rank}(A) + \dim \ker(A) = n
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Rank: $\text{rank}(A)$

\[ \text{rank}(A) + \dim \ker(A) = n \]
\end{document}

Related symbols

All Lineaire Algebra →

Frequently asked questions

How do I write Rank in LaTeX?
Type \text{rank}(A) in math mode, for example $\text{rank}(A) + \dim \ker(A) = n$. Load amsmath first with \usepackage{amsmath}.
Which package do I need for \text{rank}(A)?
\text{rank}(A) needs amsmath: add \usepackage{amsmath} to your preamble before the document starts.
Can I use \text{rank}(A) in text mode, or only in math mode?
Both. \text{rank}(A) compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredSchrijf LaTeX met AI

Beste AI LaTeX Editor, Overleaf Alternatief

Octree helpt onderzoekers van 15+ universiteiten sneller onderzoeksartikelen schrijven met AI

  • Genereer mooie TikZ-diagrammen met AI
  • Upload afbeelding en converteer naadloos naar LaTeX
  • Krijg directe hulp bij het schrijven en opmaken van onderzoeksartikelen