# About the Affine hull and Span.

I'm learning Linear Algebra and Convex Optimization simultaneously, I notice that the affine hull is, to some extent, analogous to the span, but when I read the lines "We define the affine dimension of a set C as the dimension of its affine hull" and "As an example consider the unit circle in $\mathbb{R}^2$, $\{x \in \mathbb{R}^2 \mid x_1^2 + x_2^2 = 1\}$. it's affine hull is all of $\mathbb{R}^2$, so its affine dimension is $2$." I'm wondering why the dimension is 2.

What's the exact definition of "The dimension of the affine hull"

thanks!

If $C \subseteq \mathbb{R}^n$, from optimization we know that,
$$aff(C) = S + C$$
where $aff(C)$ is affine hull of $C$, and $S$ is a unique linear subspace in $\mathbb{R}^n$ parallel to $aff(C)$. If $aff(C)$ contains the origin, then, $aff(C)$ is itself a subspace which is the case in your circle example.
Therefore, dimension of $aff(C)$ is defined as the dimension of $S$.