$L-$function of elliptic curves is Dirichlet series and defined to be $$ L(E,s) = \sum_{n\ge 1}\frac{a_n}{n^s} = \prod_p L_p(E,s), $$where the Euler factor at $p$ is $$ L_p(E,s) = \begin{cases}(1-a_pp^{-s}+p\cdot p^{-2s})^{-1},&p\nmid N=N_E\\ (1\pm p^{-s})^{-1} ,&p||N\\ 1,& p^2|N,\end{cases} $$ where $a_p=p+1-|E(F_p)|$.
Why is it defined this way?
We know Riemann zeta function, also a Dirichlet series, is $\sum _{n=1}^\infty \frac1{n^s}=\prod_{p \text{ prime}}(1-\frac1{p^s})^{-1}$. $L$-function of elliptic curves looks similar except for some p it has $\frac1{p^{2s}}$ in the denominator, why here is an extra term?
Edits:
Zeta functions and L-functions are all siblings, or possibly all analogs, of Riemann zeta function. It seems one can get zeta/L-functions for a structure like a number field, a dynamical system, etc. by comparing the structure to number sets.
For example, Riemann zeta function equals $\sum \frac1{\text{(natural number)}^s}=\prod \frac1{1-\text{(norm, or absolute value, of prime number)}^{-s}}$.
Similarly for a number field (e.g. $\mathbb{Q}$, $\mathbb{Q}[i]$), since a field has a ring, we have algebraic integers ($\mathbb{Z}$, $\mathbb{Z}[i]$), and so we have ideals (subrings). The two examples here are principle ideal domain (PID), and so all their ideals are generated by an element $a$, i.e. the ideals are the smallest subring containing $a$, they are $aR$. These ideals behave like natural numbers. Since all PIDs are unique factorization domains (UFDs), we can define prime ideals, which behaves like primes except that 0 and 1 are included. And so we have a 'analog' of (for $\mathbb{Q}$, exactly) Riemann zeta function:
$\sum \frac1{\text{((principle) ideal)}^{2s}}=\prod \frac1{1-\text{(norm of prime ideal)}^{-2s}}$, where $2s$ is not fundamentally different from $s$. Note that more exactly it's non zero ideals and prime ideals.
The prime ideals, or simply primes, for Gaussian integers can be derived from the usual primes, namely
\begin{cases} u_{-}^{+}iv, \text{where }u^2+v^2=4k+1, &p=4k+1\\ p, &p=4k+3\\ 1_{-}^{+}i, \text{where the two primes gives the same prime ideal } (1+i)\mathbb{Z}[i], &p=2. \end{cases}
The corresponding Euler factors are $$\begin{cases}(1-2p^{-s}+ p^{-2s})^{-1}=(1-p^{-s})^{-1}(1-p^{-s})^{-1},\\ (1- p^{-2s})^{-1} =(1- (+p^{-s}))^{-1}(1-(- p^{-s}))^{-1} ,\\ (1- 2^{-s})^{-1},\end{cases}$$
Therefore zeta function for $\mathbb{Q}[i]$ is
$\prod_{p \text{ is a prime ideal}} \frac1{1-||p||^{-2s}} = (1-(\sqrt{2})^{-2s})(1-3^{-2s})(1-(\sqrt{5})^{-2s})(1-(\sqrt{5})^{-2s})\dots=(1-2^{-s})(1-3^{-2s})(1-(2)5^{-s}+5^{-2s})\dots$.
Write
$(1-p^{-s+1})$ for one of $(1-p^{-s})$, (I don't know why but it seems to work and to fit the wiki link as mentioned in a comment,)
$(1\pm p^{-s})^{-1}$ for $(1- p^{-2s})^{-1}$, (since we are gonna do multiplication the two are the same,)
$1$ for $(1- 2^{-s})^{-1}$, (of this replacement I know no reason,)
then we almost get L-funciton of elliptic curves, except we get $a_p=p+1$ instead of $a_p=p+1-|E(F_p)|$.
So we see here is indeed an analog between L-function of an elliptic curve and zeta-function of $\mathbb{Q}[i]$,
So
- why we get a different $a_p$?
- why there is an analog between L-function of an elliptic curve and zeta-function of $\mathbb{Q}[i]$ (NOT that of $\mathbb{Q}$). Does the reason have something to do with that an elliptic curve is sort of a 2-dim torus ($S^1\times S^1$), and $\mathbb{Q}[i]$ is 2-dim as well?
I add further discussion inspired by some comments @Mathmo123 in the comment-chat, basically I try to use matrix representation of projective transformation of a variety (mainly mobius transformation) and the characteristic polynomial.