I'm trying to resolve two exercises from Kostrikin's book.
Ex. 1
How many elements contains vector space $\mathbb{F}_p^n$ (vectors $(x_1,x_2,\dots,x_n)$ of length $n$) over a field $\mathbb{F}_p$ with $p$ elements? How many solutions has equation $a_1x_1+a_2x_2+\dots+a_nx_n=0$ (not all $a_i=0$)?
Ex. 2
How many $k$-dimmension subspaces ($1\le k\le n$) contains $n$-dimension vector space $V$ over a field $F_q$ with $q$ elements.
I think, I resolve first exercise:
$$\left|\mathbb{F}_p^n\right|=p^n$$ because I need to create vector of length $n$. I can choose first element on $p$ ways, second too.... so $p\cdot p\cdot p\cdots p$. Number of solutions is an amount of linear dependent vectors in this space. Dimension of this space is equal $n$, so a maximum set of independent vectors contains $n$ vectors. Number of solution is equal $p^n-n$?
In case of second exercise I have two solutions.
First:
There is only one $k$-dimension subspace? Because all spaces with dimension $k$ are isomorphic.
Second:
Base of $V$ space contains $n$ vectors. So I can choose ${n \choose k}$ vectors from $V$ base and create $k$-dimension subspace. So there is ${n \choose k}$ subspaces.
Are any of my solutions correct?
Thanks.
Your answer to the first exercise is correct.
For the second exercise, first note that they ask for the number of $k$-dimensional subspaces, not the number of isomorphism classes of $k$-dimensional subspaces. If they were asking for isomorphism classes, then yes you're right there would only be 1. Also, you make the incorrect assumption that every $k$-dim subspace can be obtained as the span of a subset of your basis. This is not true. For example, in $F^2$ (let $F := \mathbb{F}_p$), you can take the basis $\{(1,0),(0,1)\}$, but here subsets of the basis yield only two distinct 1-dim subspaces, even though there are many more. For example, what about the subspace generated by $(1,1)$? In this example, $F^2$ should be thought of as a plane, and 1-dim subspaces are just lines in the plane going through the origin, which are classified by their slope (which may be infinity for the vertical line).
To correctly count the number of $k$-dim subspaces, note that any such subspace has a basis of $k$ vectors, and thus we can begin by counting the number of sets of $k$ linearly independent vectors in $V$, which we will identify with $F^n$. For the first vector you have $p^n-1$ choices (anything but $0$). For the second, you have $p^n-p$ choices (anything but a vector in the span of the first), and so on. Thus, you have $$\prod_{j=0}^{k-1}(p^n-p^j)$$ possible ordered sets of $k$ linearly independent vectors in $V$. Thus we have a map (of sets): $$f : \{\text{ordered lists of $k$ linearly independent vectors in $V$}\}\longrightarrow \{\text{$k$-dim subspaces of $V$}\}$$ (where $f(v_1,\ldots,v_k) = \text{Span}\{v_1,\ldots,v_k\}$) which is surjective, but not injective. We would like to count the size of $f^{-1}(U)$, where $U\le V$ is a $k$-dim subspace. Since $f^{-1}(U)$ is just the set of ordered bases of $U$, we find that $$|f^{-1}(U)| = \text{the number of ordered bases of $U$}$$ Identifying $U$ with $F^k$, we find that the number of ordered bases of $U$ are in bijection with matrices in $GL_k(F)$ (this group acts freely and transitively on the set of such ordered bases, or alternatively, any such ordered basis gives you a matrix in $GL_k(F)$ with elements of the basis as columns). Thus, $|f^{-1}(U)| = |GL_k(F)|$. Since this doesn't depend on $U$, we find that the number of $k$-dim subspaces of $V$ is precisely: $$\frac{\prod_{j=0}^{k-1}(p^n-p^j)}{|GL_k(F)|}$$ By the same reasoning as above, the size of $GL_k(F)$ is $$|GL_k(F)| = \prod_{j=0}^{k-1}(p^k-p^j)$$ so: $$\frac{\prod_{j=0}^{k-1}(p^n-p^j)}{|GL_k(F)|} = \frac{\prod_{j=0}^{k-1}(p^n-p^j)}{\prod_{j=0}^{k-1}(p^k-p^j)} = \prod_{j=0}^{k-1}\frac{p^{n-j}-1}{p^{k-j}-1}$$