Tickets for a movie cost $5 for children and $9 for adults. If 124 seats were filled, and the box office revenues were $776. How many children's and now many adult tickets were sold?

Let LaTeX:  \displaystyle C be the number of children's tickets and LaTeX:  \displaystyle A be the number of adult tickets. This gives the system of equations LaTeX:  \displaystyle C+A=124 \qquad 5C+9A=776 . Writing the system as a matrix gives LaTeX:  \displaystyle \left[\begin{matrix}1 & 1 & 124\\5 & 9 & 776\end{matrix}\right] . Using RREF gives LaTeX:  \displaystyle \left[\begin{matrix}1 & 0 & 85\\0 & 1 & 39\end{matrix}\right] . The number of children's tickets is 85 and the number of adult tickets is 39.