Is this subspace linear or affine? I have several subspaces where I have to determine their dimension and whether they are affine or linear? These are my answers- are they correct? Thanks for help!
a) $X = \{ x \in R^n | a^Tx = 0 \}, a \in R^n$ is given


*

*linear since any linear combination $\alpha x + \beta y, x, y \in X$ is in X. I believe its affine, too, since actual coefficients $\alpha, \beta$ doesnt really matter in this case because $\alpha(a_1x_1 + \dots + a_nx_n) + \beta(a_1y_1 + a_ny_n) = 0$ every time...

*dimension? Im guessing its max $n-1$ but Im not sure


b) $X = \{ x \in R^n | a^Tx = c \}, a \in R^n, c \in R$ are given


*

*affine because in order for the linear combination to be in $X$, $\alpha_i$ must sum to 1

*dimension again max $n-1$?


c) $X = \{ x \in R^n | x^Tx = 1 \}$


*

*affine (same justification as in b)) 


d) $X = \{ x \in R^n | a^Tx = I \}, a \in R^n$ is given


*

*not sure at all
Are my assumptions correct

 A: a) Are you familiar with concept of null spaces? set of all vectors $x$ such that $Ax=0$ for a given matrix $A$ lies in the null space of $A$.Take $A=a^T$. Every linear set is also affine, but not every affine set is  linear. Clue: Add a given constant non-zero vector to any given subspace (vector should not be from that subspace), then the subspace won't contain orgin after that, thus it won't be linear, but it will be affine.  
Now, if you are familiar with rank-nullity theorem which says: $rank(A)+dim(null(A)) = number\_of\_columns$. Here $A=a^T$ has only one non-zero row, so $rank(A)=1$. $dim(null(A))$ is dimension of null space of A which is what you are looking for. 
b) Again, that forms an affine space, but not linear (since, it doesn't contain orgin). 
I am not sure how to define dimension in this case, since it is not a subspace. But one can talk about the dimension as if it is a surface. Number of variables is $n$. Number of constraints defining the surface is $1$. So dimension is $n-1$.
c) It is not an affine space. Take $x_1=[1,0,\dots,0]$, $x_2=[0,1,0,\dots,0]$. Both vectors satisfy your conditions. Add them, do you get a point in the same set? Intuitively, the set given is set of points in the n-dimensional sphere (n=2, it is the circle). 
d) What is $I$ here? 
