For a NMOS, the transconductance gm is defined as id/vgs at a fixed VDS. However when we calculate the small signal gain of a common source amplifier, we use vds = -id x RD and then vds = -gm x vgs x RD.
Why we can substitute id as gm x vgs? according to the definition of gm, it is defined as id/vgs at a fixed VDS, but here the VDS has the change in vds in the equation.
A similar issue is that the output resistance ro, defined as id/vds at a fixed VGS. but why we can still use ro for calculation when the equation contains vgs?
Do i miss anything here?