The equation of a line passing though origin and with slope equal to 1 is .
We are given that the slope is 1 and it passes through (0,0).
Therefore the equation will be
(y−0)=1(x−0)
⇒x−y=0