Vectors and matrices

rank⁡(W)=r\operatorname{rank}(W) = r Rank

The number of independent rows (or columns) of a matrix: how many dimensions it really uses.

In ML papers

rank⁡(A)\operatorname{rank}(A) is the number of linearly independent columns of AA, which always equals the number of independent rows. An m×nm \times n matrix has rank at most min⁡(m,n)\min(m, n); if it reaches that, it is full rank.

Low rank is the idea behind LoRA (Hu et al. 2021): the update ΔW=BA\Delta W = BA with B∈Rd×rB \in \mathbb{R}^{d \times r} and A∈Rr×kA \in \mathbb{R}^{r \times k} has rank at most rr, so it needs r(d+k)r(d + k) numbers instead of dkdk. A square matrix is invertible exactly when it has full rank.

Other meanings, by context

How to type it

LaTeXShows
\operatorname{rank}(A)rank⁡(A)\operatorname{rank}(A)
\mathrm{rank}(A)rank(A)\mathrm{rank}(A)

A worked example

rank⁡(1224)=1\operatorname{rank}\begin{pmatrix} 1 & 2 \\ 2 & 4 \end{pmatrix} = 1

The second row is twice the first, so only one row is independent.

Common confusions

Related

W∈Rm×n\mathbf{W} \in \mathbb{R}^{m \times n}Bold uppercase (matrix)ΔW\Delta WDelta (capital)A−1A^{-1}Inversedet⁡(A)\det(A)Determinant

Decode this example →