I am studying time dependent perturbation theory.
Context
We introduce a Hamiltonian: $$H(t)=H_{0}+\Delta(t)$$
We also say that: let $\{|n\rangle\}$ be an orthonormal basis of $\mathcal{H}$ with $H_{0}|n\rangle=E_{n}|n\rangle$ and expand a general state as $$ |\psi(t)\rangle=\sum_{n} \mathrm{e}^{-\mathrm{i} E_{n} t / \hbar} a_{n}(t)|n\rangle $$ Using this expansion in the time dependent Schrödinger equation $\mathrm{i} \hbar \partial|\psi\rangle / \partial t=H(t)|\psi(t)\rangle$ gives $$ \sum_{n}\left(a_{n} E_{n}+\mathrm{i} \hbar \dot{a}_{n}\right) \mathrm{e}^{-\mathrm{i} E_{n} t / \hbar}|n\rangle=\sum_{n} a_{n}\left(E_{n}+\Delta(t)\right) \mathrm{e}^{-\mathrm{i} E_{n} t / \hbar}|n\rangle \tag{1} $$ Contract with $\langle k|$ to obtain $$ \mathrm{i} \hbar \dot{a}_{k}(t)=\sum_{n} a_{n}(t) \mathrm{e}^{\mathrm{i}\left(E_{k}-E_{n}\right) t / \hbar}\langle k|\Delta(t)| n\rangle \tag{2} $$
Question
Why couldn't I cross out the exponential terms on both sides of equation $(1)$? They are the same multiplicative factor corresponding to each term in the sum. However, if I did that, I wouldn't have left any exponential for line $(2)$.
I do understand how we reached line $(2)$, if we don't simplify the first line by dropping the $\mathrm{e}^{-\mathrm{i} E_{n} t / \hbar}$ terms.
Why cannot I drop the $\mathrm{e}^{-\mathrm{i} E_{n} t / \hbar}$ terms in line $(1)$?
Maybe some example where I am also not allowed to drop the same multiplicative terms from both sides of an equation would help my understanding.