# Radon Nikodym derivative when changing numeraires

I note from Wikipedia that if $$Q$$ and $$Q^N$$ are two measures corresponding to numeraires $$M$$ and $$N$$, then the Radon Nikodym derivative is given by: $$\frac{dQ^N}{dQ} = \frac{M(0)}{M(T)}\frac{N(T)}{N(0)}.$$

However I do not understand how this formula comes from the traditional definition of a Radon-Nikodym derivative, which is a random variable such that the following holds for all RV $$Z$$: $$E_N(Z)=E_M\left(\frac{dQ^N}{dQ}Z\right)$$

For any price process $$Z$$, given that $$N$$ and $$M$$ are numeraire processes, \begin{align*} E_N\left(\frac{Z_T}{N_T} \right) = E_M\left(\frac{Z_T}{M_T}\frac{M_0}{N_0} \right), \end{align*} as they both equal to $$Z_0/N_0$$. Note also that \begin{align*} E_N\left(\frac{Z_T}{N_T} \right) = E_M\left(\frac{dQ_N}{dQ_M}\frac{Z_T}{N_T} \right). \end{align*} Then \begin{align*} E_M\left(\frac{dQ_N}{dQ_M}\frac{Z_T}{N_T} \right) &= E_M\left(\frac{Z_T}{M_T}\frac{M_0}{N_0} \right)\\ &=E_M\left(\frac{N_T}{M_T}\frac{M_0}{N_0}\frac{Z_T}{N_T}\right). \end{align*} Since $$\frac{Z_T}{N_T}$$ can be arbitrary, we conclude that \begin{align*} \frac{dQ_N}{dQ_M} = \frac{N_T}{M_T}\frac{M_0}{N_0}. \end{align*}
Any nonnegative random variable $$Z$$ with expectation 1 is a Radon-Nikodym derivative: $$\mathbb{E}^{\mathbb{P}} \left(Z\right) = \mathbb{E}^{\mathbb{P}} \left(\frac{\mathrm{d}\mathbb{Q}}{\mathrm{d}\mathbb{P}}\right) = \mathbb{E}^{\mathbb{Q}} \left(1\right) = \int{\mathrm{d}\mathbb{Q}} = 1$$ $$\mathbb{Q} \left(A\right) = \mathbb{E}^\mathbb{P} \left(Z 1_A\right) \in \left[0, 1\right]$$ If $$Z$$ is positive, the probability measure $$\mathbb{Q}$$ that it defines is equivalent to the original probability measure $$\mathbb{P}$$.
Now, by definition of a numeraire, under its associated probability measure, all asset prices expressed as units of the numeraire are martingales. For $$\mathbb{Q}$$ with numeraire $$M$$ and $$N$$ a positive asset price process, $$\mathbb{E}^{\mathbb{Q}} \left(\frac{N_T}{M_T}\right) = \frac{N_0}{M_0} \Rightarrow \mathbb{E}^{\mathbb{Q}} \left(\frac{M_0}{M_T}\frac{N_T}{N_0}\right) = 1$$ Since a numeraire is always chosen to be a strictly positive asset price process, the random variable $$\frac{M_0}{M_T}\frac{N_T}{N_0}$$ defines the Radon-Nikodym derivative of measure $$\mathbb{Q}^N$$ with respect to $$\mathbb{Q}$$. If $$X$$ is an (arbitrary) asset price process, $$\mathbb{E}^{\mathbb{Q}^N} \left(X_T \frac{N_0}{N_T}\right) = \mathbb{E}^{\mathbb{Q}} \left(X_T \frac{N_0}{N_T}\frac{M_0}{M_T}\frac{N_T}{N_0}\right) = \mathbb{E}^{\mathbb{Q}} \left(X_T\frac{M_0}{M_T}\right) = X_0$$ That shows that $$N$$ is indeed the numeraire for measure $$\mathbb{Q}^N$$.