[tex]\begin{gathered} \frac{x}{a}+\frac{y}{b}=1 \\ \\ \frac{x}{2}+\frac{y}{4}=1 \\ \\ multiply\text{ through by 8 to clear fractions } \\ \\ 8(\frac{x}{2})+8(\frac{y}{4})=8\times1 \\ \\ 4x+2y=8 \end{gathered}[/tex]
The equation of the line can be written as 4x+2y=8 or 4x+2y-8=0