Consider a 2d metric given by:
$$g = dx^2 - x^2 dt^2$$
Then my notes mention that null geodesics are governed by the following equation:
$$\dot{x}^2 - x^2 \dot{t}^2$$
where the dot indicates differentiation with respect to some affine paramter $\lambda$. Can someone explain how is this equation derived? Why must null geodesics obey this equation?
Null geodesics follow $g= 0$, or equivalently
$$ 0 = ({\rm d}x)^2 - x^2({\rm d}t)^2 \tag{1} $$
Also, for some affine parameter $\lambda$ you have
$$ {\rm d}x = \frac{{\rm d}x}{{\rm d}\lambda}{\rm d}\lambda = \dot{x}{\rm d}\lambda \tag{2} $$
with a similar expression for ${\rm d}t$, if you replace that in Eq. (1) you get
$$ 0 = ({\rm d}\lambda)^2 \left(\dot x^2 - x^2\dot{t}^2 \right) \tag{3} $$
and from here you recover the conclusion of your notes