A support vector machine initially poses the following optimization problem:
$$max_{\gamma, w, b} \gamma \\ s.t\ \\ y^{(i)}(w^Tx^{(i)} + b) \ge \gamma,\ \ i=1,\dots,m \\ ||w|| = 1$$
I understand the constraints and what we are trying to maximize. What I don't understand is why $||w||=1$ constraint is a non-convex one. $||w||=1$ means that we are trying to solve parameters that lie on the surface of unit circle/sphere/etc.
I'm not familiar with convexity and convex optimization but I thought spheres were convex. Is nonconvexity referring to the constraint itself - that there is no one solution to $||w||=1$ on a unit circle/sphere because every point on a unit circle/sphere is an optimal solution?
Later in the SVM derivation, it transforms the optimization above into
$$max_{\gamma, w, b} {\hat{\gamma} \over ||w||} \\ s.t. \ \ y^{(i)}(w^Tx^{(i)} + b) \ge \hat{\gamma},\ \ i=1,\dots,m$$ and then to $$min_{\gamma, w, b} {1 \over 2} ||w||^2 \\ s.t. \ \ y^{(i)}(w^Tx^{(i)} + b) \ge 1,\ \ i=1,\dots,m$$ because maximizing ${\hat{\gamma} \over ||w||}$ = 1/||w|| is the same thing as minimizing $||w||^2$. How are they the same thing?