Implication in mathematics - How can A imply B when A is False? I have just started studying implication in mathematics. So, you'll probably have an idea of where my confusion lies right from the get go.
In the truth table, where $A \implies B$ we obtain this result:
A | B |A->B
___________
T | T | T
T | F | F
F | T | T
F | F | T

Now, my confusion here is regarding why $A\implies B$ given A is false, and B true. The others I understand. The first and last one are obvious, the second one implies, to me anyway, that given A implies B, the truth of B rests upon the truth of A, B is false, A is True, which cannot be, thus not B given A is false.
Now... then, why is B true despite the fact that A is false? Or rather, why is the statement B given not A, True. The truth of B is implied from the truth of A, but A is a false statement. So it's very contradictory that this may be, and in fact, if you go through a real life example, you would find that the third statement seems to be false.
Say $A$ is the statement that it is dark outside, and $B$ the statement that the sun is not on our side of the earth. If it is not dark outside, than stating that the sun is on the other side of the planet must be wrong (in my example i'm going to claim that the sun is the only light source).
Side note:
I just had a thought, if A is false, does that mean you can conclude... mmm, whatever? I mean, B is implied via the truth of A, if A is false, B is NOT implied, but then B could be EITHER true or false, I suppose. Is this correct?
However, would that not mean that A does not imply anything when false. Would that not set the 3rd and 4th statement to be undefined?
 A: When $p$ is false, $ p \to q$ is said to be "vacuously true": the conditional is true, but for an uninteresting reason.
There are a few ways to make sense of, or rationalize, or justify this value of $\mathsf{F} \to \mathsf{T}$.
One is to realize that it's a matter of convention and convenience. The value of $\mathsf{F} \to \mathsf{T}$ has to be something. If we decided to assign it the value $\mathsf{F}$, then this "implication" operator would be the very same thing as "iff", $\leftrightarrow$. So we declare it to be $\mathsf{T}$ in this case.
Another way is to note that $p \to q$ is true iff (truth value of $p$) $\le$ (truth value of $q$). By contrast, the biconditional $p \leftrightarrow q$ is true iff (truth value of $p$) = (truth value of $q$). From this it's easy to see why $\to$, regarded as a relation, is reflexive and transitive, and why modus ponens is a valid inference rule. From this perspective, $\mathsf{F} \to \mathsf{T}$ is no more puzzling than $0 < 1$.
Still another way is to recall that $ p \to q$ is equivalent to, and sometimes defined as, $\neg p \vee q$, which has exactly the same truth table you exhibit. When $p$ is $\mathsf{F}$, $\neg p$ is $\mathsf{T}$, so this disjunction is $\mathsf{T}$ regardless of the truth value of $q$.
Finally, the following are theorems of propositional logic:
$$
\begin{align}
& \neg (p \wedge \neg p) \\
& (p \wedge \neg p) \to q \\ 
\end{align}
$$
So, from a falsehood, you can prove anything.
If a theory is inconsistent, then for some sentence $p$ it proves both $p$ and $\neg p$. In an inconsistent theory, anything and everything is provable.
A: Turn the table around; what can we infer if A→B is true?
 A→B | A |      B
-----+---+---------------
  T  | T |      T
  T  | F | No information

On the assumption that both rows are possible, we infer that F→F and F→T must have the same truth value. (and also, that T→F is false)
Similarly,
 A→B |      A
-----+----------------
  T  | No information

and therefore F→F and F→T can't be false.

A similar justification comes from how you prove A→B; a typical method is:


*

*Assume A is true

*...

*Conclude B is true


and any (valid) argument of this form counts as a proof of A→B.
Since such a proof doesn't consider the possibility that A is false, the only way this could possibly work is if you don't need to consider that possibility: that is, if F→B is guaranteed to be true, always.
A: To paraphrase Terry Tao explanation: $A \, \Longrightarrow \, B$ means intuitively "B is not more false than A".  So if $A$ is false, then nothing is more false, any $B$ is no more false than $A$, and the implication is true. 
A: "If you stick a fork in an electrical outlet, you will get hurt."
This is true.
However, yesterday I didn't stick a fork in an electrical outlet, and then I jumped up and down on some legos for a while. Barefoot. Somehow, I still got hurt.
The formal sentence "If $A$ then $B$" is not the same as "$A$ causes $B$," or "$B$ is true if and only if $A$ is true." However, in natural language, we often do mean this (or something similar). So what's going on is that implication in formal logic - called the "material conditional" - doesn't always line up with our intuitive ideas about implication in natural language. This is indeed an issue, ranging from "annoying" to "philosophically fundamental" depending on who you talk to, and there's a lot written about it. However, within the context of formal logic, we use the material conditional.
A: "A implies B" means that B is at least as true as A, that is, the truth value of B is greater than or equal to the truth value of A.
Now, the truth value of a true statement is 1, and the truth value of a false statement is 0; there are no negative truth values.
It should be no surprise, then, that if the truth value of A is 0, then the truth value of B is greater than or equal to the truth value of A.
A: There are some good answers up there. I just want to add a tiny bit:
Sometimes, in everyday English, we use False ⇒ False to indicate denial. Suppose, for example, you claim "I am the Pope." I might then say, "If you are the Pope, then I am the Empress of China." I mean "You are not the Pope." Or, if I say "If Joe gets that job, I'll eat my hat", I mean "Joe won't get that job."  
A: There are some interesting perspectives up there. Here's another one which is somewhat different.
To me it’s a matter of “defining relations”. One “relation” is “implies”, another relation is “iff”, and so on. By writing the truth table we are simply stating that we use the word “implies” to mean the truth table you wrote. 
Suppose A and B are statements of interest. Suppose we want to say in a short sentence that “whenever A is true, B is true, and that when A is false, we do not claim anything about the truth of B”. We use the word “implies” and state for short that “A is true implies B is true”, and mean the truth relations in the truth table you wrote. For this truth table, it wouldn't be meaningful for a good definition of "implies" to have A is false, B is true, "implies" is true. This would mean we are stating that B is always true, which is a valid claim to make, but not very helpful for a suitable definition of "implies".
Keep in mind we could state a different claim, namely, that “whenever A is true, B is true, and whenever A is false, B is false”. Here we are interested in claiming something about the truth of B when A is false. In this case we use the relation “iff” for short. We use this relation make the brief statement: “A is true if and only if B is true” and mean a different set of truth relations. In particular, A is false, B is false, the relation “iff” is true. Further, A is false, B is true, "iff" is false. 
Now when you substitute “real” phrases for A and for B, you have to understand clearly what you are stating. Let’s say A is “Sticking a fork in an electrical outlet” and B is “you will get hurt”. Stating “A implies B” is the same as claiming that “if you stick a fork in an electrical outlet, you will get hurt”. This claim may not in reality be true, but that point is irrelevant to the statement from a logical point of view.  The key point is that you are claiming nothing about getting hurt if you don’t stick a fork in the outlet.
So in short, at this point it’s a matter of defining suitable definitions for useful relations, not about physical reality. Later of course we can do experiments, observe Nature, etc. to test if our claims hold up.
Postscript: Actually I would say in reality that the claim about outlets above is not true. Here’s my evidence. Once my mother stuck a fork in an electrical outliet (don’t ask me why) and in fact she didn’t get hurt. However, it’s an interesting claim. Just remember that it claims nothing about the truth of “you will get hurt” if "Sticking a fork in an electrical outlet" is false, that is, you don’t stick a fork in an outlet.
A: The key here is the difference between $A \Rightarrow B$ (A implies B) and $A \Leftrightarrow B$ (A implies B and B also implies A). Consider the logical statements $A$ = "it is night" and $B$ = "I cannot see the Sun". $A$ implies $B$ here (if it's night I can't see the Sun, at least from this part of the Earth), but $B$ does not imply $A$: it could be cloudy, or an eclipse, or I could be indoors, et cetera.
The statement $A \Rightarrow B$ doesn't make any claim about whether $B$ also implies $A$. Defining it this way makes certain things a lot easier, since we can now say (e.g.) $x>7 \Rightarrow x>5$. This is a true mathematical statement ($A \Rightarrow B$) for real $x$. In other words, $A \Rightarrow B$ is true. But what if we let $x=6$? Now $B$ is true but $A$ is false; yet you'd still agree that $A \Rightarrow B$ is true. It just so happens that $A$ is false in this one case; that doesn't impact the overall truth or falsehood of $A \Rightarrow B$.
And yes, this does mean that a falsehood implies anything. "If $2+2=5$, then I am a penguin" is a true implication. This is called "Ex Falso Sequitur Quodlibet" (from a false thing, anything you want results) or the "Principle of Explosion". If you assume a contradiction (i.e. something false also being true) you can derive anything else.
A: I find it easier to understand implication if I substitute implies with requires. 
Consider the example: "the sky is cloudy" and "it is raining".
Notice that "it is raining" requires that "the sky is cloudy". However, "the sky is cloudy" does not require "it is raining".
Using requires instead of implies helps me to distinguish between physical causation (or layman implication) from formal, logical implication.
Furthermore, I even think we should invert the arrow direction, from a --> b to a <-- b, in order to make it easier to use the requires concept.
