# How can I find the equivalent resistance, Rxy, of the two NMOS transistors in Figure 5.25 in Razavi's "Design of Analog CMOS Integrated Circuits"?

While calculating the gain ($-G_mR_{out}$) of the differential pair (with active current mirror), in order to find $R_{out}$, how is Razavi able to substitute M1 and M2 with $R_{xy}=2r_{01,2}$?

To find $R_{xy}$, we redraw the portion of Figure 5.25 of interest below, substituting small signal models for M1 and M2 (with $\gamma=0$, $g_{m1}=g_{m2}=g_m,r_{o1}=r_{o2}=r_{o}$), and apply a test voltage $v_{test}$ across the terminals:
$v_{test}=(i_{test}+g_mv_p)r_o + (i_{test}-g_mv_p)r_o$
$v_{test}=2i_{test}r_o + (g_mv_p-g_mv_p)r_o$
$R_{xy}=\frac{v_{test}}{i_{test}}=2r_o=2r_{o1,2}$.