[guided]The point of this step is to make the Jacobian matrix appear from first-order algebra. The tangent space to [affine space](/page/Affine%20Space) at $p$ is represented by linear functionals on
\begin{align*}
\mathfrak n_p/\mathfrak n_p^2,
\end{align*}
where
\begin{align*}
\mathfrak n_p=(x_1-a_1,\dots,x_n-a_n)\trianglelefteq k[x_1,\dots,x_n].
\end{align*}
The classes of $x_1-a_1,\dots,x_n-a_n$ form a $k$-basis of $\mathfrak n_p/\mathfrak n_p^2$, so a tangent vector is the same thing as a tuple $v=(v_1,\dots,v_n)\in k^n$, where $v_j$ is the value of the tangent functional on $x_j-a_j$.
Now impose the condition that the tangent vector is tangent to $X$. Since $X$ is defined by the full vanishing ideal $I(X)$, a tangent vector to $X$ must annihilate the first-order part of every function in $I(X)$. For any $f\in I(X)$, Taylor expansion modulo $\mathfrak n_p^2$ gives
\begin{align*}
f-f(p)\equiv \sum_{j=1}^n \frac{\partial f}{\partial x_j}(p)(x_j-a_j)\pmod{\mathfrak n_p^2}.
\end{align*}
Because $p\in X$ and $f\in I(X)$, we have $f(p)=0$. Evaluating the corresponding tangent functional determined by $v$ gives the linear condition
\begin{align*}
\sum_{j=1}^n \frac{\partial f}{\partial x_j}(p)v_j=0.
\end{align*}
It remains to reduce from all $f\in I(X)$ to the chosen generators. Since $I(X)=(f_1,\dots,f_r)$, every $f\in I(X)$ can be written as
\begin{align*}
f=\sum_{i=1}^r h_if_i
\end{align*}
with $h_i\in k[x_1,\dots,x_n]$. Differentiating and evaluating at $p$ gives
\begin{align*}
\frac{\partial f}{\partial x_j}(p)=\sum_{i=1}^r h_i(p)\frac{\partial f_i}{\partial x_j}(p)+\sum_{i=1}^r f_i(p)\frac{\partial h_i}{\partial x_j}(p).
\end{align*}
The second sum is zero because $f_i(p)=0$ for every $i$. Hence the first-order condition for all elements of $I(X)$ is generated by the first-order conditions for $f_1,\dots,f_r$.
Therefore $T_pX$ is exactly the kernel of the linear map
\begin{align*}
L:k^n&\to k^r
\end{align*}
whose matrix is
\begin{align*}
J(f_1,\dots,f_r)_p=\left(\frac{\partial f_i}{\partial x_j}(p)\right)_{1\le i\le r,\ 1\le j\le n}.
\end{align*}
By rank-nullity,
\begin{align*}
\dim_k T_pX=\dim_k\ker L=n-\operatorname{rank}L=n-\operatorname{rank}J(f_1,\dots,f_r)_p.
\end{align*}[/guided]