The formula for Lorentz transformation is $\Delta x'=\gamma (\Delta x-v\Delta t)$ and $\Delta t'=\gamma (\Delta t-\beta\Delta x/c)$
I was trying to derive length contraction from Lorentz transformation. Since length is just the position of two ends of an object at the same time, both $\Delta t'$ and $\Delta t$ should be $0$. When I plug $\Delta t'=\Delta t=0$ into the equation, I didn't really get $\Delta x'=\Delta x\gamma$. I have no idea why.