Why is this assumption made in deriving time dilation? My book makes the following assumptions (as far as I understood) in deriving length contraction and time dilation from Lorentz transformation :
Suppose there is an inertial frame $S$ and another frame $S'$ which has a velocity $v$ relative to $S$. There is a rod whose starting point is $a'$ and ending point is $b'$ in $S'$ and so $b'-a'$ is its proper length and so it's length can be calculated in $S$ using Lorentz transformation and in using the transformation the assumption that $t_2=t_1$ is made. As far as I understand, this assumption is based upon the fact that the measurement of both points have to be simultaneous in the $S$ frame.
But in case of deriving time dilation the books assumes that $a'=b'$. However I find this very confusing. The proper time between two events in $S'$ is $t_2 '- t_1 '$ and so we can calculate the time difference in $S$ using Lorenz transformation. Then why is $a'=b'$ assumed instead of $a=b$ like the former derivation?
I am quite new to SR and so forgive me if it seems a really silly question.
 A: I agree that the explanation as it stands now is a little misleading. The reason for this, I feel, is because it doesn't speak of specific events that we're taking into consideration.
The proper time interval $\Delta\tau$ between two events is defined as the time interval measured by an observer for whom both events occur at the same location. In other words, it is the time interval between two events that can be measured by the same clock.
Thus, it isn't so much an assumption as a definition. Just as the difference in the end-points of a moving object in $S$ can't be called its length unless these points were measured simultaneously, the difference in time intervals between two events in $S^\prime$ can't be called ``proper time'' unless the events occur at the same location in space.
You could, of course, try to find a relationship between the time intervals of events that don't occur at the same point in $S^\prime$, but the corresponding time interval in $S$ will then also depend on the spatial separation of these events in $S^\prime$. This is not a useful quantity, however, since different observers would disagree about the numerical value of this time interval.
Further reading: Why is the time interval between two events measured by two synchronised clocks seperated by a distance not proper?, and JohnRennie's answer therein.

You might already know this, but I like to think of time dilation in terms of this simple thought experiment: Consider a `light' clock, which we make using a rod and an emitter and detector of light. A pulse of light is emitted at one end of the rod, reflected at the other end, and detected back where it was emitted. Let us place this clock in the frame $S^\prime$ where it is moving with respect to $S$ with a velocity $v$.
A light clock at rest in $S^\prime$, observed from $S$. The light pulse emitted at one end of the rod is reflected at the other end and detected at back at the point of emission. Alice sits near the emitter/detector in $S^\prime$ and measures the time between emission and detection. This is the proper time between those events, as they occur at the same place. Bob, an observer in $S$, also measures the time interval between emission and detection. However, while the spatial coordinates of these events in $S^\prime$ are the same ($x^\prime_A$), they are different when viewed from $S$, as the clock is moving with respect to an observer in $S$.
Alice sees the light traverse the length of the rod twice and be detected after some time $\Delta t^\prime$. We would like to relate this to the time interval that Bob measures. In order to relate these two observations, let us consider the two events:

We can easily see that $\Delta x^\prime = 0$, and so using the appropriate (inverse) Lorentz Transformation,
\begin{equation*}
    \begin{aligned}
         \Delta t &= \gamma \left( \Delta t^\prime + \frac{v}{c^2}\Delta x^\prime \right)\\
\text{i.e. }        \Delta t &= \gamma \Delta t^\prime
    \end{aligned}
\end{equation*}
Thus, $\Delta t > \Delta t^\prime$, in other words intervals of time measured by Bob in $S$ would appear to take longer than the same intervals as measured by Alice in $S^\prime$.
