I'd like to learn how the Raviart-Thomas (RT) element works. To that end I'd like to analytically describe how the basis functions look on the reference square. The goal here is not to implement it myself, but rather just to get an intuitive understanding of the element.
I'm largely basing this work off of the triangular elements discussed here, perhaps extending it to quadrilaterals is a mistake in itself.
That said, I can define the basis functions for first RK element RK0:
$$\mathbf{\phi}_i(\mathbf{x}) = \mathbf{a} + \mathbf{b}\mathbf{x} = \begin{pmatrix} a_1 + b_1 x\\a_2 + b_2 y\end{pmatrix}$$ for $i = 1,\dots,4.$
The conditions on $\mathbf{\phi}_i$ are that:
$$\mathbf{\phi}_i(\mathbf{x}_j)\cdot\mathbf{n}_j = \delta_{ij}$$
where $\mathbf{n}_j$ is the unit normal shown below, and $\mathbf{x}_j$ is its coordinate.
This is the reference square $[-1,1]\times[1,1]$, so this leads to a system of equations for each basis function. For $\mathbf{\phi}_1$ this is:
$$\begin{pmatrix} 1 & 0 & 1 & 0\\ 0 & -1 & 0 & 1\\ -1 & 0 & 1 & 0\\ 0 & 1 & 0 & 1\end{pmatrix}\begin{pmatrix}a_1 \\ a_2\\ b_1\\ b_3\end{pmatrix} = \begin{pmatrix} 1\\0\\0\\0\end{pmatrix}$$
which can be solved to give:
$$\mathbf{\phi}_1(\mathbf{x}) = \frac{1}{2}\begin{pmatrix} 1 + x\\ 0\end{pmatrix}$$
The other basis functions can be found similarly.
Assuming this is correct, the next step is to find the basis functions for RK1. This is where I'm getting a little unsure of myself. According to the link above, the space we are interested in is:
$$P_1(K) + \mathbf{x}P_1(K)$$
A basis for $P_1$ would be $\{ 1, x, y\}$
I think this means the RK1 basis functions should take the form:
$$\mathbf{\phi}_i(\mathbf{x}) = \begin{pmatrix} a_1 + b_1 x + c_1 y + d_1 x^2 + e_1 xy\\ a_2 + b_2 x + c_2 y + d_2 xy + e_2 y^2\end{pmatrix}$$
This leaves 10 unknowns for each basis function. If we apply the same conditions as in the RK0 case, namely:
$$\mathbf{\phi}_i(\mathbf{x}_j)\cdot\mathbf{n}_j = \delta_{ij}$$, where $\mathbf{n}_j$ is the unit normal as shown below:
this gives us 8 equations. The other 2 I think can be found from some moments. I'm not really sure how exactly. The link above talks about integrating against a basis for $[P_1]^2$, but I'm having trouble figuring out what that means. Am I on the right track, or have I completely missed something here?