TITLE: When and how is it appropriate for an undergraduate to email a professor out of the blue?
QUESTION [118 upvotes]: This may not be appropriate for MathOverflow, as I haven't seen precedent for this type of question. But the answer is certainly of interest to me, and (I think) would be of interest to many other undergraduates. 
Often, while seeing some lecture online, or reading lecture notes from the internet, or hearing about someone who is an expert in a topic I'm interested in, I feel as though I want to email the professor in charge of whatever I'm looking at or hearing about. Usually this is about some question; these questions can range from the very technical to the very speculative. In the past, when I have mustered up enough guts to actually email the question, I've had good results (question answered, or reference given, etc.) However, every time I send a question I get the same sort of anxiety of "I have no idea what I'm doing!"
So here are my questions:

When is it appropriate to email a professor (that you don't know) a question about their work? (Remember; I'm an undergraduate, so these questions have a high chance of being inane in one way or another).
How should this email be formatted? Do I give my name in the first line? Or do I give a bit of background, ask the question, and sign my name. (The latter is what I have been doing).
How specific should the subject line be in order to increase the chances that the email gets read?
Should I mention anywhere in the email that I am an undergraduate?
This one is kind of silly, but I always have trouble deciding what to do: Suppose that I've emailed a professor, and they email me back with some answer... is it appropriate to email back with just a "Thank you"? I always feel like I'm wasting their time with such a contentless email, but at the same time I do want to thank them... Actually, in general I feel as though my questions are a waste of the professor's time (probably what feeds the email anxiety)... which brings me to:
If you happen to be a professor who has received such emails in the past; are they a waste of your time? Please be honest!

EDIT: Small new question...

If you receive a response and the professor signs with their first name, are you supposed to refer to them by first name the next time you email them?

Once again, if you think this is an inappropriate question, I totally understand. But please start a thread on meta to discuss it, because I think this might be borderline, at least.

REPLY [9 votes]: Let me also try to answer the questions:
So here are my questions:

1.When is it appropriate to email a professor (that you don't know) a
  question about their work? (Remember;
  I'm an undergraduate, so these
  questions have a high chance of being
  inane in one way or another).

If you have a research level question about a professor's work or related to his or her field of interest it is appropriate to email.

2.How should this email be formatted? Do I give my name in the first line?
  Or do I give a bit of background, ask
  the question, and sign my name. (The
  latter is what I have been doing).

You can first introduce yourself. You may give the background to the question. Try to be clear and rather brief.

3.How specific should the subject line be in order to increase the chances
  that the email gets read?

As informative as possible, 
"A question about convex bodies", "Are there only finitely many smooth toric varieties" 
"An idea related to the Erdos-Faber-Lovasz conjecture".

4.Should I mention anywhere in the email that I am an undergraduate?

Yes. If this is a good research level question it will will be impressing and if not it will not harm.  

5.This one is kind of silly, but I always have trouble deciding what to
  do: Suppose that I've emailed a
  professor, and they email me back with
  some answer... is it appropriate to
  email back with just a "Thank you"? I
  always feel like I'm wasting their
  time with such a contentless email,
  but at the same time I do want to
  thank them... Actually, in general I
  feel as though my questions are a
  waste of the professor's time
  (probably what feeds the email
  anxiety)...

Yes. email back with "thank you".

which brings me to:
6.If you happen to be a professor who has received such emails in the past;
  are they a waste of your time? Please
  be honest! EDIT: Small new question...

I have received quite a few of emails from undergraduates. Usually it is not a waste of time.

7.If you receive a response and the professor signs with their first name,
  are you supposed to refer to them by
  first name the next time you email
  them?

No.