* Pertinent means relevant or applicable to a particular matter.
* Impertinent means lacking in courtesy or respect; rude.
The prefix "im-" in "impertinence" means "not" or "the opposite of". So, impertinence is the state of being "not pertinent" or "not relevant".