# Error Computation for Grid Functions

I am using a finite difference method to compute a function in 2D. Let $u(x)$ denote the function to be computed. Let $U_i$ be the set of computed values at grid points $x_i = a + i\Delta x$ for $i=0,\dots,N$ (i.e., $U_i \approx u(x_i)$). Let the vector of errors $\mathbf e = (e_1, \dots, e_N)$ be defined by $e_i = U_i - u(x_i)$.

In the 1D space, it is simple to compute the error using a formula such as:

$$\| \mathbf e \|_2^{1d} = \sqrt{\Delta x \sum\limits_{i=0}^{N} |e_i|^2} \quad \mbox{(I)}$$

In 2D, I came up with two different formulas. One is:

$$\| \mathbf e \|_2^{2d} = \sqrt{\Delta x \Delta y \sum_i \sum_j |e_{ij}|^2} \quad \mbox{(II)}$$

The other one is:

$$\| \mathbf e \|_2^{2d} = \sqrt{\Delta y \sum_j \|\mathbf e_{j}\|_2^{1d}} \quad \mbox{(III)}$$ where $\mathbf e_j$ is the vector obtained from $\mathbf e$ by fixing $j$.

Formula (II) is the one that I found in many web pages and textbooks but formula (III) is proposed by my profesor.

I wonder what the difference between (II) and (III) is and which formula is a better selection? I also came up with two names: $2$-norm and $l^2$-norm. So, which one is which?

-