For which fields is $\left\{\begin{pmatrix} a & -b \\ b & a \end{pmatrix} \,\middle |\, a, b \in F\right\} \subset M_2(F)$ a field? Consider $R$ the set of matrices of the form 
$$A = \left(\begin{array}{rr}a& -b \\b& a\end{array}\right),$$ where $a$ and $b$ live in a given field $F$.
I know $R$ is a commutative ring with the identity matrix and now want to determine for which of $F = \mathbb{Q}, \mathbb{R}, \mathbb{C}, \mathbb{F}_5, \mathbb{F}_7$ is $R$ a field? Also how to generally characterize the types of fields including which prime fields $\mathbb{F}_p$ that will make $R$ a field? 
 A: The matrix $\begin{pmatrix} a & -b \\  b & a \end{pmatrix}$ is invertible iff its determinant, $\delta = a^2 + b^2$  is nonzero. In this case, its inverse is $\delta^{-1} \begin{pmatrix} a & b \\ -b & a \end{pmatrix}$,  which still lives in your set.
So, your question is equivalent to: for which fields does the quadratic form $\delta(x,y) = x^2 + y^2$ admit only one zero, namely $(0,0)$? In fancier terms, for which field is the form $x^2 + y^2$ anisotropic?
The answer is that it is for $\mathbb Q$, $\mathbb R$ (obvious, for sign reasons) and $\mathbb F_7$ (the only squares modulo $7$ are $0$, $1$, $2$ and $-3$, so two squares cannot cancel out) and it isn't for $\mathbb C$ ($1^2 + i^2 = 0$) or $\mathbb F_5$ ($1^2 + 2^2 = 5 = 0$).
In general, for a finite field with an odd number $q$ of elements, the answer is that the form is anisotropic if and only if $-1$ isn't a square, iff $q \equiv 3 \,(\mathrm{mod}\,4)$. It's not very hard and very classical, you can probably find this result in your favourite algebra book.
In general, questions about forms being isotropic or anisotropic is one of the main questions in the algebraic theory of quadratic forms, a fascinating subject in itself. If you have access to it, the beginning of Lam's Quadratic Forms over Fields is a marvelous read (and you will se that questions like "is this matrix ring a field?" pop up quite naturally in this theory).
A: This answers the general question.
Given a commutative sub-ring $R$ of the ring of $n\times n$ matrices over a field $\mathbb F$ which contains $\alpha I$ for each $\alpha \in \mathbb F$
Then:

$R$ is a field if and only if every non-zero $A\in R$ has an minimal polynomial which is irreducible over $\mathbb F$. 

Indeed, the characteristic polynomial for each element will be a perfect power of the minimal polynomial, so if you have $p(x)$ is  the characteristic polynomial for $A\in R$, then the minimal polynomial will be:
$$\frac{p(x)}{\gcd(p(x),p'(x))}$$
whenever the characteristic of $\mathbb F$ does not divide $n$. (It gets tricky with fields with finite character in general, however.)
Or:

$R$ is a field if and only if there are no non-zero zero divisors.

Or:

$R$ is a field if and only if every non-zero element has non-zero determinant.

An interesting side-point: Assuming $n>1$, $R$ is not a field if there is any non-zero element of $R$ which has an eigenvalue in $\mathbb F$. 
A: Well, you need to know that every element of $R$ except the $2\times2$ zero matrix is invertible. In other words, you need to know that if we have such a matrix $A$ with $a,b$ not both $0,$ then the determinant of $A$ is non-zero. For which (if any) of the listed fields can we guarantee this?
Edit: As Thomas points out, it is necessary that each non-zero element of $R$ is invertible, but need not sufficient! We must be show more: namely, that if $A\in R,$ then there is some $B\in R$ for which $AB=I.$ To see this, write $A=aI+bK,$ as Thomas suggested. In order for $A$ to have an inverse in $R,$ there must be $c,d$ in the field such that $B:=cI+dK$ satisfies $$AB=I.$$ This gives you a system of two linear equations in $2$ variables--$c$ and $d$--for which we must solve in terms of the constants $a,b.$ In which (if any) of the listed fields can this be done? In which (if any) can we fail?
Another Edit: Working with the cases (that is: $a=0,$ $b=0,$ $ab\ne0,$ we find that, in fact, each non-zero matrix $A\in R$ has an inverse in $R$ if and only if $\det A\ne0$ for all non-zero $A\in R.$ Can you use this to classify which fields can satisfy the desired condition?
