# Flag (linear algebra)

In mathematics, particularly in linear algebra, a flag is an increasing sequence of subspaces of a finite-dimensional vector space V. Here "increasing" means each is a proper subspace of the next (see filtration):
    $\{0\}=V_{0}\subset V_{1}\subset V_{2}\subset \cdots \subset V_{k}=V.$
The term flag is motivated by a particular example resembling a flag: the zero point, a line, and a plane correspond to a nail, a staff, and a sheet of fabric.
If we write that dimV$_i$ = d$_i$ then we have
    $0=d_{0}<d_{1}<d_{2}<\cdots <d_{k}=n,$
where n is the dimension of V (assumed to be finite). Hence, we must have k ≤ n. A flag is called a complete flag if d$_i$ = i for all i, otherwise it is called a partial flag.
A partial flag can be obtained from a complete flag by deleting some of the subspaces. Conversely, any partial flag can be completed (in many different ways) by inserting suitable subspaces.
The signature of the flag is the sequence (d$_1$, ..., d$_k$).

## Bases

An ordered basis for V is said to be adapted to a flag V$_0$ ⊂ V$_1$ ⊂ ... ⊂ V$_k$ if the first d$_i$ basis vectors form a basis for V$_i$ for each 0 ≤ i ≤ k. Standard arguments from linear algebra can show that any flag has an adapted basis.
Any ordered basis gives rise to a complete flag by letting the V$_i$ be the span of the first i basis vectors. For example, the standard flag in R$^n$ is induced from the standard basis (e$_1$, ..., e$_n$) where e$_i$ denotes the vector with a 1 in the ith entry and 0's elsewhere. Concretely, the standard flag is the sequence of subspaces:
    $0<\left\langle e_{1}\right\rangle <\left\langle e_{1},e_{2}\right\rangle <\cdots <\left\langle e_{1},\ldots ,e_{n}\right\rangle =K^{n}.$
An adapted basis is almost never unique (the counterexamples are trivial); see below.
A complete flag on an inner product space has an essentially unique orthonormal basis: it is unique up to multiplying each vector by a unit (scalar of unit length, e.g. 1, −1, i). Such a basis can be constructed using the Gram-Schmidt process. The uniqueness up to units follows inductively, by noting that $v_{i}$ lies in the one-dimensional space $V_{i-1}^{\perp }\cap V_{i}$.
More abstractly, it is unique up to an action of the maximal torus: the flag corresponds to the Borel group, and the inner product corresponds to the maximal compact subgroup.

## Stabilizer

The stabilizer subgroup of the standard flag is the group of invertible upper triangular matrices.
More generally, the stabilizer of a flag (the linear operators $T$ on V such that $T(V_{i})<V_{i}$ for all i) is, in matrix terms, the algebra of block upper triangular matrices (with respect to an adapted basis), where the block sizes $d_{i}-d_{i-1}$. The stabilizer subgroup of a complete flag is the set of invertible upper triangular matrices with respect to any basis adapted to the flag. The subgroup of lower triangular matrices with respect to such a basis depends on that basis, and can therefore not be characterized in terms of the flag only.
The stabilizer subgroup of any complete flag is a Borel subgroup (of the general linear group), and the stabilizer of any partial flags is a parabolic subgroup.
The stabilizer subgroup of a flag acts simply transitively on adapted bases for the flag, and thus these are not unique unless the stabilizer is trivial. That is a very exceptional circumstance: it happens only for a vector space of dimension 0, or for a vector space over $\mathbf {F} _{2}$ of dimension 1 (precisely the cases where only one basis exists, independently of any flag).

## Subspace nest

In an infinite-dimensional space V, as used in functional analysis, the flag idea generalises to a subspace nest, namely a collection of subspaces of V that is a total order for inclusion and which further is closed under arbitrary intersections and closed linear spans. See nest algebra.

## Set-theoretic analogs

From the point of view of the field with one element, a set can be seen as a vector space over the field with one element: this formalizes various analogies between Coxeter groups and algebraic groups.
Under this correspondence, an ordering on a set corresponds to a maximal flag: an ordering is equivalent to a maximal filtration of a set. For instance, the filtration (flag) $\{0\}\subset \{0,1\}\subset \{0,1,2\}$ corresponds to the ordering $(0,1,2)$.