Why is "to" used after the verb at the end of a sentence?

I would do it if I wanted to.

I would do it if I wanted.

Why is to used after the verb? Only to give emphasis? Is there a difference in the meanings of the above sentences?


It's an example of ellipsis, where words aren't repeated because they're understood. The full sentence would be 'I would do it if I wanted to do it', but it's unnecessary to include the last two words. 'I would do it if I wanted' is also possible, but the final 'to' is more likely to be found, if only in conversation. I'm not sure why that is so, but it may be because the sentence sounds rather blunt without it.


I think I would do it if I wanted to. is really a shorter spoken way for a more appropriate I would do it if I wanted to do it.

The possibilities would be (as javaDisciple pointed out), I would action1 if I wanted to action1/other action

In general use, I think, ending with a to would just imply that the same action is to follow. i.e, I would action1 if I wanted to action1