You decide to drive the 2800 miles from New York to Los Angeles in a hybrid vehicle.
A hybrid vehicle has two modes: using only the electric motor and battery, it can travel 1 mile on 3 units of battery power;
using only the internal combustion engine, it can travel 1 mile on 0.1 liters of gas (about 37 mpg) while also charging the
battery with 1 unit of battery power. At the end of your trip, you have 1400 fewer units of battery power than you did when
you began the trip. How much gasoline did you use (in liters)?
One possible solution is to solve the matrix equation below for
n, the number of liters of gasoline used:
  3 battery power/mile on battery  1 battery power/mile on engine
 1 miles/mile on battery  1 miles/mile on engine
 0 liters of gas/mile on battery  0.1 liters of gas/mile on engine 
 

⋅   x miles on battery  y miles on engine 
 
  
 =    1400 battery power  2800 miles  n liters of gas 
 



The above equation can be rewrittenn as:
We then have that 245 liters were used:
Notice that it is possible to solve an equation for a 2 × 2 matrix first, and then
use
x and
y to determine
n. For example:
It is also possible to immediately notice that 10 ⋅
n is the number of miles travelled
on
n liters of gasoline. Then, the following matrix equation can be set up and solved:
  3 battery power/mile on battery  10 battery power/liter of gas
 1 miles/mile on battery  10 miles/liter of gas 
 

⋅   x miles on battery  n liters of gas 
 
  
 =    1400 battery power  2800 miles 
 


