[proofplan]
We construct the desired basis by induction on $\dim V$. If $B = 0$, any basis works (with $r = 0$). If $B \neq 0$, we find a "symplectic pair" $(e_1, f_1)$ with $B(e_1, f_1) = 1$, show that $V = \operatorname{span}(e_1, f_1) \oplus \operatorname{span}(e_1, f_1)^\perp$ as a direct sum, and apply the inductive hypothesis to the restriction of $B$ to the orthogonal complement. The invariance of $r$ follows from the fact that the matrix rank of $B$ (which equals $2r$) is independent of the choice of basis, by the [Change of Basis for Bilinear Forms](/theorems/391).
[/proofplan]
[step:Base case: if $B = 0$, any basis gives the zero matrix]
If $B(v, w) = 0$ for all $v, w \in V$, then the matrix of $B$ with respect to any basis is the zero matrix, which has the required block form with $r = 0$.
[/step]
[step:Find a symplectic pair $(e_1, f_1)$ with $B(e_1, f_1) = 1$]
Assume $B \neq 0$. Then there exist $u, w \in V$ with $B(u, w) \neq 0$. Define
\begin{align*}
e_1 := u, \qquad f_1 := \frac{1}{B(u, w)} \, w.
\end{align*}
Then $B(e_1, f_1) = B\!\left(u,\, \frac{1}{B(u,w)} w\right) = \frac{B(u,w)}{B(u,w)} = 1$. By skew-symmetry, $B(f_1, e_1) = -B(e_1, f_1) = -1$, and $B(e_1, e_1) = 0$, $B(f_1, f_1) = 0$ (since $B(v, v) = -B(v, v)$ implies $2B(v,v) = 0$, and $\operatorname{char}(k) \neq 2$).
[guided]
Since $B \neq 0$, there exist vectors $u, w \in V$ with $B(u, w) \neq 0$. We want to normalise so that $B(e_1, f_1) = 1$. Set $e_1 = u$ and $f_1 = \frac{1}{B(u,w)} w$ (the scalar $B(u,w) \in k$ is nonzero, hence invertible). Then
\begin{align*}
B(e_1, f_1) = B\!\left(u,\, \frac{1}{B(u,w)} w\right) = \frac{1}{B(u,w)} B(u, w) = 1.
\end{align*}
What are $B(e_1, e_1)$ and $B(f_1, f_1)$? Skew-symmetry gives $B(v, v) = -B(v, v)$ for any $v$, so $2B(v,v) = 0$. Since $\operatorname{char}(k) \neq 2$, $B(v,v) = 0$ for every $v \in V$. In particular $B(e_1, e_1) = B(f_1, f_1) = 0$, and $B(f_1, e_1) = -B(e_1, f_1) = -1$.
The matrix of $B$ restricted to $P := \operatorname{span}(e_1, f_1)$ with respect to the basis $(e_1, f_1)$ is therefore $\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}$, which is exactly one copy of the $2 \times 2$ symplectic block.
[/guided]
[/step]
[step:Show $V = P \oplus P^\perp$ where $P = \operatorname{span}(e_1, f_1)$]
Let $P = \operatorname{span}(e_1, f_1)$ and $P^\perp = \{v \in V : B(v, p) = 0 \text{ for all } p \in P\}$. We show $V = P \oplus P^\perp$.
**$P \cap P^\perp = \{0\}$:** Let $v = \alpha e_1 + \beta f_1 \in P \cap P^\perp$. Since $v \in P^\perp$, we have $B(v, e_1) = 0$ and $B(v, f_1) = 0$. Computing:
\begin{align*}
0 = B(v, e_1) &= \alpha B(e_1, e_1) + \beta B(f_1, e_1) = \alpha \cdot 0 + \beta \cdot (-1) = -\beta, \\
0 = B(v, f_1) &= \alpha B(e_1, f_1) + \beta B(f_1, f_1) = \alpha \cdot 1 + \beta \cdot 0 = \alpha.
\end{align*}
Hence $\alpha = \beta = 0$, so $v = 0$.
**$V = P + P^\perp$:** For any $v \in V$, define
\begin{align*}
v' := v - B(v, f_1)\, e_1 + B(v, e_1)\, f_1.
\end{align*}
Then $v' \in P^\perp$, since
\begin{align*}
B(v', e_1) &= B(v, e_1) - B(v, f_1) B(e_1, e_1) + B(v, e_1) B(f_1, e_1) \\
&= B(v, e_1) - 0 + B(v, e_1)(-1) = 0, \\
B(v', f_1) &= B(v, f_1) - B(v, f_1) B(e_1, f_1) + B(v, e_1) B(f_1, f_1) \\
&= B(v, f_1) - B(v, f_1) \cdot 1 + 0 = 0.
\end{align*}
Since $v = B(v, f_1)\, e_1 - B(v, e_1)\, f_1 + v'$ with the first two terms in $P$ and $v' \in P^\perp$, we have $v \in P + P^\perp$.
[guided]
Let $P = \operatorname{span}(e_1, f_1)$. We want to decompose $V$ as $P \oplus P^\perp$. This requires two things: $P \cap P^\perp = \{0\}$ and $V = P + P^\perp$.
**Why $P \cap P^\perp = \{0\}$:** Suppose $v = \alpha e_1 + \beta f_1 \in P$ also lies in $P^\perp$. Then $B(v, e_1) = 0$ and $B(v, f_1) = 0$. Expanding using bilinearity and the values $B(e_1, e_1) = 0$, $B(e_1, f_1) = 1$, $B(f_1, e_1) = -1$, $B(f_1, f_1) = 0$:
\begin{align*}
B(v, e_1) = \alpha \cdot 0 + \beta \cdot (-1) = -\beta = 0, \\
B(v, f_1) = \alpha \cdot 1 + \beta \cdot 0 = \alpha = 0.
\end{align*}
So $\alpha = \beta = 0$ and $v = 0$. The key point is that the restriction of $B$ to $P$ is nondegenerate (its matrix $\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}$ has determinant $1 \neq 0$), which is why no nonzero vector in $P$ can be orthogonal to all of $P$.
**Why $V = P + P^\perp$:** We must show every $v \in V$ can be written as $p + v'$ with $p \in P$ and $v' \in P^\perp$. The idea is to subtract off the "components along $P$" using the symplectic pairing. Define
\begin{align*}
v' := v - B(v, f_1)\, e_1 + B(v, e_1)\, f_1.
\end{align*}
Why this formula? We want $B(v', e_1) = 0$ and $B(v', f_1) = 0$. Writing $v' = v - \alpha e_1 - \beta f_1$ and solving $B(v', e_1) = 0$, $B(v', f_1) = 0$ gives $\beta = -B(v, e_1)$ and $\alpha = B(v, f_1)$, which is exactly the formula above.
Verifying $v' \in P^\perp$:
\begin{align*}
B(v', e_1) &= B(v, e_1) - B(v, f_1) \underbrace{B(e_1, e_1)}_{0} + B(v, e_1) \underbrace{B(f_1, e_1)}_{-1} = B(v, e_1) - B(v, e_1) = 0, \\
B(v', f_1) &= B(v, f_1) - B(v, f_1) \underbrace{B(e_1, f_1)}_{1} + B(v, e_1) \underbrace{B(f_1, f_1)}_{0} = B(v, f_1) - B(v, f_1) = 0.
\end{align*}
Since $v = \underbrace{B(v, f_1)\, e_1 - B(v, e_1)\, f_1}_{\in\, P} + \underbrace{v'}_{\in\, P^\perp}$, we have $V = P + P^\perp$.
[/guided]
[/step]
[step:Apply induction on $P^\perp$ to build the full symplectic basis]
The restriction $B|_{P^\perp}: P^\perp \times P^\perp \to k$ is a skew-symmetric bilinear form on $P^\perp$, and $\dim P^\perp = \dim V - 2$ (since $\dim P = 2$ and $V = P \oplus P^\perp$).
We proceed by induction on $\dim V$. The base case $\dim V = 0$ (or $B = 0$) was handled above. For the inductive step, assume the theorem holds for all spaces of dimension less than $\dim V$. Since $\dim P^\perp = \dim V - 2 < \dim V$, the inductive hypothesis applied to $(P^\perp, B|_{P^\perp})$ yields a basis $(e_2, \ldots, e_{r}, f_2, \ldots, f_{r}, g_1, \ldots, g_s)$ of $P^\perp$ in which the matrix of $B|_{P^\perp}$ has the standard block form with parameter $r - 1$ (i.e., $r-1$ symplectic pairs and $s$ vectors in the radical).
The combined basis $(e_1, e_2, \ldots, e_r, f_1, f_2, \ldots, f_r, g_1, \ldots, g_s)$ is a basis for $V = P \oplus P^\perp$. Since $B(e_1, \cdot)$ and $B(f_1, \cdot)$ vanish on $P^\perp$ (by definition of $P^\perp$), and the matrix of $B|_P$ in the basis $(e_1, f_1)$ is $\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}$, the matrix of $B$ in this combined basis has the required block form with parameter $r$:
\begin{align*}
\begin{pmatrix} 0 & I_r & 0 \\ -I_r & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}.
\end{align*}
[guided]
We now apply induction. The inductive hypothesis states: for any skew-symmetric bilinear form on a space of dimension less than $\dim V$, there exists a basis giving the standard block form.
The restriction $B|_{P^\perp}$ is skew-symmetric on $P^\perp$, and $\dim P^\perp = \dim V - \dim P = \dim V - 2$. By the inductive hypothesis, there exists a basis of $P^\perp$ in which $B|_{P^\perp}$ has the block form with some parameter $r' \geq 0$: there are $r'$ symplectic pairs $(e_2, f_2), \ldots, (e_{r'+1}, f_{r'+1})$ and $s$ vectors $g_1, \ldots, g_s$ spanning the radical of $B|_{P^\perp}$, with $2r' + s = \dim P^\perp$.
Now assemble the full basis of $V = P \oplus P^\perp$. Order it as $(e_1, e_2, \ldots, e_{r'+1}, f_1, f_2, \ldots, f_{r'+1}, g_1, \ldots, g_s)$. What does the matrix of $B$ look like in this basis?
The cross-terms between $P$ and $P^\perp$ all vanish: for any $v \in P^\perp$, $B(e_1, v) = 0$ and $B(f_1, v) = 0$ by definition of $P^\perp$, and by skew-symmetry $B(v, e_1) = -B(e_1, v) = 0$ and $B(v, f_1) = -B(f_1, v) = 0$. So the matrix is block-diagonal between $P$ and $P^\perp$. The $P$-block is $\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}$, and the $P^\perp$-block is already in standard form with parameter $r'$. The total parameter is $r = r' + 1$, and the matrix has the required shape:
\begin{align*}
\begin{pmatrix} 0 & I_r & 0 \\ -I_r & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}.
\end{align*}
[/guided]
[/step]
[step:Prove that $r$ is an invariant of $B$]
The matrix rank of $B$ (i.e., the rank of the matrix $[B(e_i, e_j)]$ with respect to any basis) is an invariant: by the [Change of Basis for Bilinear Forms](/theorems/391), if $P$ and $Q$ are the change-of-basis matrices, the matrix transforms as $M \mapsto P^\top M Q$, and since the change-of-basis for a form on $V \times V$ with the same basis in both slots gives $M \mapsto P^\top M P$, the rank is preserved (as $P$ is invertible, $\operatorname{rank}(P^\top M P) = \operatorname{rank}(M)$).
In the standard block form, the matrix has rank $2r$ (the upper-right $I_r$ and lower-left $-I_r$ contribute $2r$ linearly independent rows). Since the matrix rank equals $2r$ regardless of the basis chosen, and $2r$ is uniquely determined by the matrix rank, $r$ is an invariant of $B$.
In particular, if $B$ is nondegenerate (the radical $\{v \in V : B(v, w) = 0 \text{ for all } w \in V\}$ is $\{0\}$), then the zero block in the lower-right corner is absent, $\dim V = 2r$, and $B$ is equivalent to the standard symplectic form on $\mathbb{R}^{2r}$.
[guided]
Why is $r$ independent of the choice of basis? The key observation is that $r$ is determined by the **matrix rank** of $B$, which is a basis-independent invariant.
By the [Change of Basis for Bilinear Forms](/theorems/391), if we change from basis $(e_i)$ to basis $(e_i')$ via an invertible matrix $P$ (so $e_j' = \sum_i P_{ij} e_i$), the matrix of $B$ transforms as $M \mapsto P^\top M P$. Since $P$ is invertible, $P^\top M P$ and $M$ have the same rank: $\operatorname{rank}(P^\top M P) = \operatorname{rank}(M)$ (multiplication by invertible matrices preserves rank).
In the standard block form, the matrix is
\begin{align*}
\begin{pmatrix} 0 & I_r & 0 \\ -I_r & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}.
\end{align*}
This matrix has rank $2r$: the first $r$ rows have $I_r$ in the upper-right block, and the next $r$ rows have $-I_r$ in the lower-left block, giving $2r$ linearly independent rows; the remaining $\dim V - 2r$ rows are zero. Since the matrix rank is $2r$ and is basis-independent, the integer $r = \frac{1}{2} \operatorname{rank}(M)$ is an invariant of $B$.
For the final assertion: if $B$ is nondegenerate, then $\operatorname{rad}(B) = \{v \in V : B(v, w) = 0 \text{ for all } w \in V\} = \{0\}$. In the standard form, $\operatorname{rad}(B)$ is spanned by the last $\dim V - 2r$ basis vectors, so nondegeneracy forces $\dim V - 2r = 0$, i.e., $\dim V = 2r$. The standard form with $r = \dim V / 2$ and no zero block is exactly the standard symplectic form on $\mathbb{R}^{2r}$.
[/guided]
[/step]