Should you still send a thank you even if you are not hired?
There are several reasons why you should send thank you communications to persons with whom you have contact during your job search.
If someone has taken time from his/her work day to answer your questions, assist you in finding information, given you a tour of a plant or office, or in some other way has provided help to you in your quest, simple politeness suggests that you should do more than give a vocal recognition of their time and efforts.
If you have had a formal interview, the person(s) you spoke to have probably spent time reviewing your application materials before they met with you, and may spend more time after the interview summarizing their impressions and analyzing your potential to fill the opening they have. Acknowledging their attention is appropriate.
By sending a thank you communication even if you aren't offered a position, you are placing your name in the attention of people involved in hiring again. When another opening develops, they may be more likely to remember applicants whose names they have seen multiple times. You are demonstrating your initiative and willingness to do more than others. It is also possible that those persons may mention your name to someone else who is looking for a new hire - networking is invaluable for those looking for a job.