In logic and mathematics, necessity and sufficiency are terms used to describe a conditional or implicational relationship between two statements. For example, in the conditional statement: "If P then Q", Q is necessary for P, because the truth of Q is "necessarily" guaranteed by the truth of P. (Equivalently, it is impossible to have P without Q, or the falsity of Q ensures the falsity of P.) Similarly, P is sufficient for Q, because P being true always or "sufficiently" implies that Q is true, but P not being true does not always imply that Q is not true.
In general, a necessary condition is one (possibly one of several conditions) that must be present in order for another condition to occur, while a sufficient condition is one that produces the said condition. The assertion that a statement is a "necessary and sufficient" condition of another means that the former statement is true if and only if the latter is true. That is, the two statements must be either simultaneously true, or simultaneously false.