I have a question about the solution to this problem ''find the flux of $x\hat i + y \hat j + z \hat k$ through the sphere of radius $a$ and center at the origin. Take $n$ pointing outward.''
The answer in the book was, we have $n =\frac{(x \hat i + y \hat j + z \hat k)}{a} $; therefore $F .n = a$ and then they integrate it, but what I don't get is how $F.n=a$ isn't the vector $n$ the same vector as $F$ but scaled by $1/a$ so the dot product must be $\frac{(x^2 \hat i +y^2 \hat j +z^2 \hat k )}{a} $
Welcome opaque. The dot product $F\cdot n$ gives you a scalar which represent the length of the projection of $F$ on the normal outer vector $n$. This means that by definition $$ F\cdot n=F^1n^1+F^2n^2+F^3n^3=\frac{x^2+y^2+z^2}{a}, $$ and since you are on a sphere $x^2+y^2+z^2=a^2$, obtaining $F\cdot n=a$, as wished.