How does handle attachment work in Morse Theory I am reading R.E.Gompf and A.I. Stipsicz, 4-Manifolds and Kirby Calculus. I can't understand the 2nd-paragraph of p.101, where they explain framings on the attaching sphere. In particular I cannot understand the sentence "By composing $\varphi$ with a self-diffeomorphism of the second factor of $D^{k}\times D^{n-k}$, we can arrange for [an element of $GL(n-k)$] to be the identity at a preassigned basepoint in $S^{k-1}$."
I can't understand why there is such a diffeomorphism. Please explain to me how to solve my problem.
In addition to this,I don't exactly know the definition of "framing." In my understanding this, it is an identification of a normal bundle with the trivial bundle.Is this correct?     
 A: A handle attachment is the process of gluing a copy of $D^k\times D^{n-k}$ to $\partial X$. A (normal) framing gives a recipe for performing such a gluing, by specifying (up to ambient isotopy) a collar of $\partial D^{k}\times \{0\}$ in $X$. Gompf-Stipsicz express this data as:


*

*An embedding $\varphi_0\colon\, S^{k-1}\to\partial X$ with trivial normal bundle.

* An identification of the normal bundle $\nu\varphi_0(S^{k-1})$ with $S^{k-1}\times \mathbb{R}^{n-k}$.


The claim in the paragraph which confuses you is that the set of framings is a $\pi_{k-1}(O(n-k))$ torsor. That means that it's just like the group $\pi_{k-1}(O(n-k))$, except it doesn't have a natural choice of basepoint. So identifying a framing with an element of $\pi_{k-1}(O(n-k))$ isn't meaningful in general, but you can identify a difference between framings with an element of $\pi_{k-1}(O(n-k))$. So this is an archetypical example of a torsor. John Baez wrote an outstanding exposition of torsors, which I strongly recommend: http://math.ucr.edu/home/baez/torsors.html
So arbitrarily choose a framing $f_0$ to be the `basepoint'. The goal is now to identify $f\circ f_0^{-1}$ with an element of $\pi_{k-1}(O(n-k))$. A-priori, at any point in $S^{k-1}$, the map $f\circ f_0^{-1}$ is an invertible linear transformation from $\mathbb{R}^{n-k}$ to itself, thus an element of $GL(n-k)$. The map $f\circ f_0^{-1}$ is a diffeomorphism, so the element of $GL(n-k)$ varies smoothly as we smoothly change the point in $S^{k-1}$.
Now to the sentence which is confusing you. At preassigned basepoint $p\in S^{k-1}$, map $f\circ f_0^{-1}$ takes as its value some matrix, which we'll call $M$. The group $GL(n-k)$ has two connected components- matrices with positive determinant, and matrices with negative determinant. So, using a bump function, you can construct a diffeomorphism of the second factor of $D^k\times D^{n-k}$ which equals multiplication by $M^{-1}$ in a neighbourhood $U$ of $p$, and equals $\pm \mathrm{id}$ outside the closure of a larger neighbourhood $V\supset U$ of $p$ (depending on whether the determinant of $M$ was positive or negative). After composing with such a diffeomorphism, you're left with a map of $S^{k-1}$ into $GL(n-k)$ which equals the identity matrix at $p\in S^{k-1}$. I.e. you're left with an element of $\pi_{k-1}(GL(n-k))$.
Finally, Gram-Schmidt the whole story to retract $GL(n-k)$ onto $O(n-k)$. This is standard, but a nice exposition of the details exists in a few places. For example, Thurston explains the mechanics of this deformation retract in 3-Dimensional Geometry and Topology on page 204.
And you're done! It's actually quite simple and elegant once you work through it, although some nice illustrations would make it even more so.
