let $g(x) = x^2+x-1$ and let $h(x) = x^3-x+1$ obtain fields $4$, $8$, $9$, and $27$ elements by adjoining a root of $f(x)$ to the field $F$ where $f(x)=g(x)$ or $h(x)$ and $F = F_2$ or $F_3$. The teacher gave me the solution to this problem but i do not understand how $F_2[x]/(g(x))$ is a field with four elements, $F_2[x]/(h(x))$ is a field with eight elements, and so on. My question how do you determine or what is the procedure to find how many elements that the field will have. Anyone please help me. All i understand in this problem is that $g(x)$ and $h(x)$ are irreducible in both $F_2$ and $F_3$ thus $F_2[x]/(h(x))$, $F_2[x]/(g(x))$, $F_3[x]/(g(x))$, $F_3[x]/(h(x))$ are fields. How many elements they contain i do not know how to find that.