David Hume, answered from the texts and cited to the page.
The whole of what we can reason about divides, cleanly and exhaustively, into two kinds. Relations of ideas are propositions discoverable by the mere operation of thought, without dependence on anything existent in the universe. Geometry, algebra, arithmetic — these are the sciences of this first kind.1 That the square of the hypotenuse equals the square of the two sides, or that three times five is equal to the half of thirty: such propositions carry their evidence within themselves, and would retain their certainty even if no circle or triangle had ever existed in nature.2
They are either intuitively or demonstratively certain; their contraries imply a contradiction and cannot be distinctly conceived. Matters of fact are ascertained in an entirely different manner. The contrary of any matter of fact is always possible — it implies no contradiction and is conceived by the mind with the same ease as the fact itself.3
That the sun will not rise tomorrow is no less intelligible a proposition than that it will; you cannot demonstrate its falsehood, for were it demonstratively false, it would imply a contradiction, and it plainly does not.4 Our evidence for matters of fact therefore rests not on the operation of thought alone, but on experience — on the relation of cause and effect, by which we extend our knowledge beyond the present testimony of the senses and the records of memory.
This division carries a further consequence for morality, which I pressed in the Treatise of Human Nature. If the understanding operates only by comparing ideas or inferring matters of fact, and there is no third operation available to it, then moral qualities — if they were objects of the understanding at all — would have to fall under one of these two heads.5
But the four relations susceptible of demonstration (resemblance, contrariety, degrees in quality, proportions in quantity and number) belong as properly to inanimate matter as to human actions and volitions; it is therefore absurd to make the essence of morality consist in them.6 And cause and effect — the great relation governing matters of fact — is itself not discoverable from the ideas of objects alone; we receive information about it from experience, not from abstract reasoning.7 The division, properly followed out, does a great deal of philosophical work.
All the objects of human reason or enquiry may naturally be divided into two kinds, to wit, Relations of Ideas, and Matters of Fact.An Enquiry Concerning Human Understanding, p. 12
Propositions of this kind are discoverable by the mere operation of thought, without dependence on what is anywhere existent in the universe. Though there never were a circle or triangle in nature, the truths demonstrated by Euclid would for ever retain their certainty and evidence.An Enquiry Concerning Human Understanding, p. 12
The contrary of every matter of fact is still possible; because it can never imply a contradiction, and is conceived by the mind with the same facility and distinctness, as if ever so conformable to reality.An Enquiry Concerning Human Understanding, p. 12
That the sun will not rise to-morrow is no less intelligible a proposition, and implies no more contradiction than the affirmation, that it will rise. We should in vain, therefore, attempt to demonstrate its falsehood.An Enquiry Concerning Human Understanding, p. 12
As the operations of human understanding divide themselves into two kinds, the comparing of ideas, and the inferring of matter of fact; were virtue discover'd by the understanding; it must be an object of one of these operations, nor is there any third operation of the understanding, which can discover it.A Treatise of Human Nature, p. 298
Resemblance, contrariety, degrees in quality, and proportions in quantity and number; all these relations belong as properly to matter, as to our actions, passions, and volitions. 'Tis unquestionable, therefore, that morality lies not in any of these relations, nor the sense of it in their discovery.A Treatise of Human Nature, p. 298
the power, by which one object produces another, is never discoverable merely from their ideas, 'tis evident cause and effect are relations, of which we receive information from experience, and not from any abstract reasoning or reflection.A Treatise of Human Nature, p. 50