In Likelihood function page of Wikipedia, the definition of likelihood is written as below:
Given a probability density or mass function
$x \mapsto f(x\mid\theta),$ (1)
where x is a realization of the random variable X, the likelihood function is
$\theta \mapsto f(x\mid\theta),$ (2)
often written
$L(\theta\mid x).$ (3)
In other words, when $f(x\mid \theta )$ is viewed as a function of x with $\theta$ fixed, it is a probability density function, and when viewed as a function of $\theta$ with x fixed, it is a likelihood function.
I interpret the formula (2) as the function f is a function of of x with $\theta$ fixed. Then it seems to me that formula (2) and the sentence "when viewed as a function of $\theta$ with x fixed, it is a likelihood function" contradicts. Assuming that in this sentence "a fucntion" refers to L makes more sense. But then my next question is how (2) can be written as (3) where two variables($\theta$, x) are exchanged?
Where am I misunderstanding of the fomulas?