In this example we consider a closed subscheme $X_1\subset \mathbb{P}^{n+1}\setminus \{P\}$ where $P=(0:\ldots:0:1)$. For every $a\in \mathbb{A}^1\setminus 0$ we have an automorphism of $\mathbb{P}^{n+1}$ defined by $\varphi_a(x_0:\ldots:x_{n+1}):=(x_0:\ldots:ax_{n+1})$ which fixes $P$. We define $X_a:=\varphi(X_1)$. Then Hartshorne claims that this is a flat family parametrized by $\mathbb{A}^1\setminus 0$. What is the morphism $f:\mathfrak{X}\to \mathbb{A}^1\setminus 0$ whose fibers are the $X_a$? I guess as a scheme over $\mathbb{A}^1\setminus 0$, the family $\mathfrak{X}$ is supposed to be isomorphic to $X_1\times (\mathbb{A}^1\setminus 0)$ so I thought maybe we could just take this as our map defining the family but I guess I'm confused about whether we lose information by doing this.


You're correct that abstractly $\mathfrak{X}$ is isomorphic to $X_1\times(\Bbb A^1\setminus 0)$, but we care about the embedding here which gives more to consider. For instance, all of the fun stuff with degenerations on the pages following this example require this more interesting embedding - if we embedded things in the manner you suggest, we'd get a trivial family isomorphic to $X_1\times\Bbb A^1$ after taking the appropriate closure, which is decidedly not what happens in these examples.

The embedding $\mathfrak{X}\to \Bbb P^{n+1}_{\Bbb A^1\setminus 0}$ that Hartshorne is after can be written as a composite of $X\times(\Bbb A^1\setminus 0)\to \Bbb P^{n+1}\times (\Bbb A^1\setminus 0) \cong \Bbb P^{n+1}_{\Bbb A^1\setminus 0}$ by the product of the embedding of $X\to\Bbb P^{n+1}$ and the identity on $\Bbb A^1\setminus 0$ followed by the automorphism of $\Bbb P^{n+1}_{\Bbb A^1\setminus 0}$ given on the level of graded rings by the map $$k[a,a^{-1},x_0,\cdots,x_{n+1}]\mapsto k[a,a^{-1},x_0,\cdots,x_{n+1}],$$ $$x_i\mapsto x_i \text{ when } i\neq n+1,$$ $$x_{n+1}\mapsto ax_{n+1}, \quad a\mapsto a$$ where $\deg x_i=1$ and $\deg a=0$.