TITLE: Blow-up in family
QUESTION [8 upvotes]: Let $\pi \colon X \to T$ be a flat projective morphism, and let $Y$ be a closed sub-scheme of $X$ which is flat over $T$. We can assume that everything is defined over the complex numbers, and $T$ is one dimensional, say smooth and affine.
I want to consider the blow-up $\eta \colon X' \to X$ with centre $Y$. I have the following three questions:

Is $X'$ flat over T?
Is $(X')_t$ the blow-up of $X_t$ at $Y_t$? Where $t$ is a closed point of $T$, and the sub-index $t$ means that we are taking the fibre over $t$.
In case of positive answer to the previous question, does the exceptional divisor $E$ of $X'$ restrict to the exceptional divisor of $(X')_t $?

I think the answer is, thanks to the flatness of $Y$, always positive; however, I am not that sure about the proofs I have, and I could not find any reference.

REPLY [15 votes]: No, that is not true.  First the positive result.  If you add the hypothesis that $X$ is integral, then $X'$ is integral (Proposition II.7.16, p. 166 of Hartshorne).  Thus $X'$ is flat over $T$ (Proposition III.9.7, p. 257 of Hartshorne).  Even in this case, typically $(X')_t$ does not equal the blowing up of $X_t$ at $Y_t$. 
The simplest example I know uses a general pencil of hyperplane sections of a singular quadric cone.  So let $\widehat{X}$ be the singular quadric cone in $\mathbb{P}^3_k = \text{Proj}\ k[p,q,r,s]$ with defining equation $pr-q^2$.  Consider the Lefschetz pencil of hyperplane sections with base locus $\text{Zero}(pr-q^2,q,s)$, and let $X\to \widehat{X}$ be the blowing up of the base locus.  
Equivalently, for $T=\mathbb{P}^1_k = \text{Proj}\ k[Q,S]$, let $X$ be the closed subscheme of $\mathbb{P}^3_k \times \mathbb{P}^1_k$ that is the zero scheme $\text{Zero}(pr-q^2, qS-sQ)$.  The issue, of course, is that $X$ is not locally factorial at the singular point $x$ given by $([p,q,r,s],[Q,S]) = ([0,0,0,1],[0,1])$.  The induced morphism $\pi:X\to T$ is flat since $X$ is Cohen-Macaulay (even locally a hypersurface), $T$ is regular, and $\pi$ has constant fiber dimension $1$.  Denote by $t$ the image of $x$ under $\pi$.
So now let $Y\subset X$ be the closed subscheme that is the following zero scheme $\text{Zero}(p-q,r-q,qS-sQ)$.  This closed subscheme of $X$ is the image of a section of the projection morphism.  In fact, $Y\subset X$ is everywhere locally a Cartier divisor except at the special point $x$.  The blowing up of $Y$ in $X$ (technically the ideal sheaf of $Y$) is the same as the blowing up of $x$ in $X$.  The exceptional divisor $E$ is a smooth curve isomorphic to $\mathbb{P}^1$, and it is contained in the fiber over $t$.  Thus, $(X')_t$ has an extra irreducible component, $E$, beyond the blowing up of $X_t$ at $Y_t$.
I believe that the argument about flatness above may work even without the  hypothesis that $X$ is integral, but I need to check this . . . 
Edit. The flatness result above is true so long as $X$ is $T$-flat, even if $Y$ is not $T$-flat.  Since $X$ is flat over $T$, the sheaf $\mathcal{O}_X$ is flat over $\pi^{-1}\mathcal{O}_T$.  Since $T$ is a Dedekind scheme, this equivalent to saying that $\mathcal{O}_X$ has zero $\pi^{-1}\mathcal{O}_T$-torsion.  Thus, for every quasi-coherent ideal sheaf $\mathcal{J}\subset \mathcal{O}_X$, also $\mathcal{J}$ has zero $\pi^{-1}\mathcal{O}_T$-torsion.  In particular, for the defining ideal $\mathcal{I}$ of $Y$, for every integer $d\geq 0$, the ideal $\mathcal{J}=\mathcal{I}^d$ has zero $\pi^{-1}\mathcal{O}_T$-torsion. Thus the sheaf of graded $\mathcal{O}_X$-algebras, $$\mathcal{S} = \bigoplus_{d\geq 0} \mathcal{I}^d,$$ has zero $\pi^{-1}\mathcal{O}_T$-torsion.  Thus, the relative Proj of $\mathcal{S}$ is $T$-flat.
Second Edit. Thanks to Allen Knutson for correcting inconsistent notation.