I'm studying convex optimization using Convex Optimization (Boyd & Vandenberghe) and had a question from an example used in Chapter 4.2: Convex Optimization.
The specific example is as follows:
$\text{minimize}\quad \ f_0(x) = x_1^2 + x_2^2$
$\text{subject to}\quad f_1(x) = \frac{x_1}{1+x_2^2} \le 0$
$\qquad\qquad\quad\ h_1(x) = (x_1 + x_2)^2 = 0$
The textbook states that this problem is not a convex optimization problem because the equality constraint $h_1(x)$ is not affine.
I'm aware that affine functions are linear functions composed with a translation, but when I plotted out the graph for $h_1(x)$ I get a line or plane, which are both affine sets. This led to my confusion as to why the function isn't affine if it's graph is an affine set.
Why isn't it an affine function? Is my understanding of what an affine function is itself wrong?