# How many $k$-dimensional affine subspaces?

I'm trying to determine the number of $k$-dimensional affine subspaces of a $n$-dimensional affine space ($k \leq n$) $X$ over $\mathbb{F}_q$, where $q$ is the power of a prime number.

Let $V$ be the underlying $n$-dimensional vector space over $\mathbb{F}_q$ of $X$. I already have the number of $k$-dimensional subspaces of $V$:

$\frac{(q^n-1)(q^n-q)...(q^n-q^{k-1})}{(q^k-1)(q^k-q)...(q^k-q^{k-1})}$

My first thought was to multiply this by $q^k$, since there are $q^k$ points in a $k$-dimensional affine subspace and every $k$-dimensional affine subspace $S$ of $X$ can be written as: $S=a+T$, where $a \in S$ and $T$ is a $k$-dimensional subspace of $V$. Is this correct?

• No, because you are overcounting: each affine subspaces corresponds to many pairs $(a,T)$. – Mariano Suárez-Álvarez Dec 15 '16 at 18:05

Let $P$ be the set of pairs $(a,T)$ with $a\in V$ and $T$ a linear subspace of $V$ of dimension $k$ and let $A$ be the set of affine subspaces of $V$ of dimension $k$.
There is a surjective map $\pi:(a,T)\in P\mapsto a+T\in A$. You know how may elements $P$ has: call it $u$. Find the cardinal $v$ of the preimage $\pi^{-1}(S)$ of an element $S\in A$, show that it does not depend on which $S$ you pick.
The cardinal you want is clearly $u/v$.
• Thanks! But shouldn't $a$ be in $S$ instead of $V$? – J.Bosser Dec 15 '16 at 18:14
• No. ${}{}{}{}{}$ – Mariano Suárez-Álvarez Dec 15 '16 at 18:15
• (In the definition of the set $P$ there is no $S$, so your suggestion does not really make sense :-) ) – Mariano Suárez-Álvarez Dec 15 '16 at 18:16