Applying the Distributive Law to Linear Expressions