Theory:
Prefixes and Suffixes are used to generate words of the same family as the source word.
Happy gives Unhappy by the addition of UN, and both words are part of the same family.
There is a group of prefixes which are used to create the opposite of a word.
These are UN, IM, IN, IL, IR and DIS.
For example,
happy - UN happy
visible - IN visible
legible - IL legible
possible - IM possible
responsible - IR responsible
honest - DIS honest
It is important to note that the addition of suffixes often change the spelling but the addition of prefixes do not affect the spelling of the word. They can sometimes affect the way the word is pronounced.
Often the prefixes UN and DIS are used to create the opposite form of adjectives,
happy - UN happy
honest - DIS honest
but they can also be used with verbs to create other verbs with the reverse action.
lock - UN lock
appear - DIS appear
There are some other prefixes that have specific meanings when used with verbs,
RE, OVER, and MIS,
write - RE write (RE here means DO AGAIN.)
cook - OVER cook (OVER here means TOO MUCH.)
understand - MIS understand (MIS here means incorrectly.)