Below is Chapter X of John Locke's famous Essay Concerning Human Understanding, in which Locke makes an argument for the existence of God. This is one of the best succinct arguments for God's existence I have yet come across, better even in my opinion than some of the more famous cases, such as that of Thomas Aquinas in his Summa Theologica. I don't agree with everything Locke has to say, but I think much of what he has to say is both valid and very well articulated. I particularly like points 1 through 6, where Locke lays out a very basic argument. In the rest of the points, he goes back and elaborates on particular aspects of what he has already laid out. I also like point 10, where Locke elaborates on why consciousness cannot be derived from non-consciousness.
Locke comments on the Ontological argument in point 7. My own thoughts on that argument can be found here. Also, Locke's discussion of the relationship of matter to thought may be illuminated by an examination of Idealism.
The version below is the one found on the Era of Great Voyages website. I've altered the spacing between paragraphs a bit and removed the headings to each point.
1. Though God has given us no innate ideas of himself; though he has stamped no original characters on our minds, wherein we may read his being; yet having furnished us with those faculties our minds are endowed with, he hath not left himself without witness: since we have sense, perception, and reason, and cannot want a clear proof of him, as long as we carry ourselves about us. Nor can we justly complain of our ignorance in this great point; since he has so plentifully provided us with the means to discover and know him; so far as is necessary to the end of our being, and the great concernment of our happiness. But, though this be the most obvious truth that reason discovers, and though its evidence be (if I mistake not) equal to mathematical certainty: yet it requires thought and attention; and the mind must apply itself to a regular deduction of it from some part of our intuitive knowledge, or else we shall be as uncertain and ignorant of this as of other propositions, which are in themselves capable of clear demonstration. To show, therefore, that we are capable of knowing, i.e. being certain that there is a God, and how we may come by this certainty, I think we need go no further than ourselves, and that undoubted knowledge we have of our own existence.
2. I think it is beyond question, that man has a clear idea of his own being; he knows certainly he exists, and that he is something. He that can doubt whether he be anything or no, I speak not to; no more than I would argue with pure nothing, or endeavour to convince nonentity that it were something. If any one pretends to be so sceptical as to deny his own existence, (for really to doubt of it is manifestly impossible,) let him for me enjoy his beloved happiness of being nothing, until hunger or some other pain convince him of the contrary. This, then, I think I may take for a truth, which every one's certain knowledge assures him of, beyond the liberty of doubting, viz. that he is something that actually exists.
3. In the next place, man knows, by an intuitive certainty, that bare nothing can no more produce any real being, than it can be equal to two right angles. If a man knows not that nonentity, or the absence of all being, cannot be equal to two right angles, it is impossible he should know any demonstration in Euclid. If, therefore, we know there is some real being, and that nonentity cannot produce any real being, it is an evident demonstration, that from eternity there has been something; since what was not from eternity had a beginning; and what had a beginning must be produced by something else.
4. Next, it is evident, that what had its being and beginning from another, must also have all that which is in and belongs to its being from another too. All the powers it has must be owing to and received from the same source. This eternal source, then, of all being must also be the source and original of all power; and so this eternal Being must be also the most powerful.
5. Again, a man finds in himself perception and knowledge. We have then got one step further; and we are certain now that there is not only some being, but some knowing, intelligent being in the world. There was a time, then, when there was no knowing being, and when knowledge began to be; or else there has been also a knowing being from eternity. If it be said, there was a time when no being had any knowledge, when that eternal being was void of all understanding; I reply, that then it was impossible there should ever have been any knowledge: it being as impossible that things wholly void of knowledge, and operating blindly, and without any perception, should produce a knowing being, as it is impossible that a triangle should make itself three angles bigger than two right ones. For it is as repugnant to the idea of senseless matter, that it should put into itself sense, perception, and knowledge, as it is repugnant to the idea of a triangle, that it should put into itself greater angles than two right ones.
6. Thus, from the consideration of ourselves, and what we infallibly find in our own constitutions, our reason leads us to the knowledge of this certain and evident truth,- That there is an eternal, most powerful, and most knowing Being; which whether any one will please to call God, it matters not. The thing is evident; and from this idea duly considered, will easily be deduced all those other attributes, which we ought to ascribe to this eternal Being. If, nevertheless, any one should be found so senselessly arrogant, as to suppose man alone knowing and wise, but yet the product of mere ignorance and chance; and that all the rest of the universe acted only by that blind haphazard; I shall leave with him that very rational and emphatical rebuke of Tully (I. ii. De Leg.), to be considered at his leisure: "What can be more sillily arrogant and misbecoming, than for a man to think that he has a mind and understanding in him, but yet in all the universe beside there is no such thing? Or that those things, which with the utmost stretch of his reason he can scarce comprehend, should be moved and managed without any reason at all?" Quid est enim verius, quam neminem esse oportere tam stulte arrogantem, ut in se mentem et rationem putet inesse, in caelo mundoque non putet? Aut ea quae vix summa ingenii ratione comprehendat, nulla ratione moveri putet?
From what has been said, it is plain to me we have a more certain knowledge of the existence of a God, than of anything our senses have not immediately discovered to us. Nay, I presume I may say, that we more certainly know that there is a God, than that there is anything else without us. When I say we know, I mean there is such a knowledge within our reach which we cannot miss, if we will but apply our minds to that, as we do to several other inquiries.
7. How far the idea of a most perfect being, which a man may frame in his mind, does or does not prove the existence of a God, I will not here examine. For in the different make of men's tempers and application of their thoughts, some arguments prevail more on one, and some on another, for the confirmation of the same truth. But yet, I think, this I may say, that it is an ill way of establishing this truth, and silencing atheists, to lay the whole stress of so important a point as this upon that sole foundation: and take some men's having that idea of God in their minds, (for it is evident some men have none, and some worse than none, and the most very different,) for the only proof of a Deity; and out of an over fondness of that darling invention, cashier, or at least endeavour to invalidate all other arguments; and forbid us to hearken to those proofs, as being weak or fallacious, which our own existence, and the sensible parts of the universe offer so clearly and cogently to our thoughts, that I deem it impossible for a considering man to withstand them. For I judge it as certain and clear a truth as can anywhere be delivered, that "the invisible things of God are clearly seen from the creation of the world, being understood by the things that are made, even his eternal power and Godhead." Though our own being furnishes us, as I have shown, with an evident and incontestable proof of a Deity; and I believe nobody can avoid the cogency of it, who will but as carefully attend to it, as to any other demonstration of so many parts: yet this being so fundamental a truth, and of that consequence, that all religion and genuine morality depend thereon, I doubt not but I shall be forgiven by my reader if I go over some parts of this argument again, and enlarge a little more upon them.
8. There is no truth more evident than that something must be from eternity. I never yet heard of any one so unreasonable, or that could suppose so manifest a contradiction, as a time wherein there was perfectly nothing. This being of all absurdities the greatest, to imagine that pure nothing, the perfect negation and absence of all beings, should ever produce any real existence.
It being, then, unavoidable for all rational creatures to conclude, that something has existed from eternity; let us next see what kind of thing that must be.
9. There are but two sorts of beings in the world that man knows or conceives.
First, such as are purely material, without sense, perception, or thought, as the clippings of our beards, and parings of our nails.
Secondly, sensible, thinking, perceiving beings, such as we find ourselves to be. Which, if you please, we will hereafter call cogitative and incogitative beings; which to our present purpose, if for nothing else, are perhaps better terms than material and immaterial.
10. If, then, there must be something eternal, let us see what sort of being it must be. And to that it is very obvious to reason, that it must necessarily be a cogitative being. For it is as impossible to conceive that ever bare incogitative matter should produce a thinking intelligent being, as that nothing should of itself produce matter. Let us suppose any parcel of matter eternal, great or small, we shall find it, in itself, able to produce nothing. For example: let us suppose the matter of the next pebble we meet with eternal, closely united, and the parts firmly at rest together; if there were no other being in the world, must it not eternally remain so, a dead inactive lump? Is it possible to conceive it can add motion to itself, being purely matter, or produce anything? Matter, then, by its own strength, cannot produce in itself so much as motion: the motion it has must also be from eternity, or else be produced, and added to matter by some other being more powerful than matter; matter, as is evident, having not power to produce motion in itself. But let us suppose motion eternal too: yet matter, incogitative matter and motion, whatever changes it might produce of figure and bulk, could never produce thought: knowledge will still be as far beyond the power of motion and matter to produce, as matter is beyond the power of nothing or nonentity to produce. And I appeal to every one's own thoughts, whether he cannot as easily conceive matter produced by nothing, as thought to be produced by pure matter, when, before, there was no such thing as thought or an intelligent being existing? Divide matter into as many parts as you will, (which we are apt to imagine a sort of spiritualizing, or making a thinking thing of it,) vary the figure and motion of it as much as you please- a globe, cube, cone, prism, cylinder, &c., whose diameters are but 100,000th part of a gry, will operate no otherwise upon other bodies of proportionable bulk, than those of an inch or foot diameter; and you may as rationally expect to produce sense, thought, and knowledge, by putting together, in a certain figure and motion, gross particles of matter, as by those that are the very minutest that do anywhere exist. They knock, impel, and resist one another, just as the greater do; and that is all they can do. So that, if we will suppose nothing first or eternal, matter can never begin to be: if we suppose bare matter without motion, eternal, motion can never begin to be: if we suppose only matter and motion first, or eternal, thought can never begin to be. For it is impossible to conceive that matter, either with or without motion, could have, originally, in and from itself, sense, perception, and knowledge; as is evident from hence, that then sense, perception, and knowledge, must be a property eternally inseparable from matter and every particle of it. Not to add, that, though our general or specific conception of matter makes us speak of it as one thing, yet really all matter is not one individual thing, neither is there any such thing existing as one material being, or one single body that we know or can conceive. And therefore, if matter were the eternal first cogitative being, there would not be one eternal, infinite, cogitative being, but an infinite number of eternal, finite, cogitative beings, independent one of another, of limited force, and distinct thoughts, which could never produce that order, harmony, and beauty which are to be found in nature. Since, therefore, whatsoever is the first eternal being must necessarily be cogitative; and whatsoever is first of all things must necessarily contain in it, and actually have, at least, all the perfections that can ever after exist; nor can it ever give to another any perfection that it hath not either actually in itself, or, at least, in a higher degree; it necessarily follows, that the first eternal being cannot be matter.
11. If, therefore, it be evident, that something necessarily must exist from eternity, it is also as evident, that that something must necessarily be a cogitative being: for it is as impossible that incogitative matter should produce a cogitative being, as that nothing, or the negation of all being, should produce a positive being or matter.
12. Though this discovery of the necessary existence of an eternal Mind does sufficiently lead us into the knowledge of God; since it will hence follow, that all other knowing beings that have a beginning must depend on him, and have no other ways of knowledge or extent of power than what he gives them; and therefore, if he made those, he made also the less excellent pieces of this universe,- all inanimate beings, whereby his omniscience, power, and providence will be established, and all his other attributes necessarily follow: yet, to clear up this a little further, we will see what doubts can be raised against it.
13. First, Perhaps it will be said, that, though it be as clear as demonstration can make it, that there must be an eternal Being, and that Being must also be knowing: yet it does not follow but that thinking Being may also be material. Let it be so, it equally still follows that there is a God. For if there be an eternal, omniscient, omnipotent Being, it is certain that there is a God, whether you imagine that Being to be material or no. But herein, I suppose, lies the danger and deceit of that supposition:- there being no way to avoid the demonstration, that there is an eternal knowing Being, men, devoted to matter, would willingly have it granted, that this knowing Being is material; and then, letting slide out of their minds, or the discourse, the demonstration whereby an eternal knowing Being was proved necessarily to exist, would argue all to be matter, and so deny a God, that is, an eternal cogitative Being: whereby they are so far from establishing, that they destroy their own hypothesis. For, if there can be, in their opinion, eternal matter, without any eternal cogitative Being, they manifestly separate matter and thinking, and suppose no necessary connexion of the one with the other, and so establish the necessity of an eternal Spirit, but not of matter; since it has been proved already, that an eternal cogitative Being is unavoidably to be granted. Now, if thinking and matter may be separated, the eternal existence of matter will not follow from the eternal existence of a cogitative Being, and they suppose it to no purpose.
14. But now let us see how they can satisfy themselves, or others, that this eternal thinking Being is material.
I. I would ask them, whether they imagine that all matter, every particle of matter, thinks? This, I suppose, they will scarce say; since then there would be as many eternal thinking beings as there are particles of matter, and so an infinity of gods. And yet, if they will not allow matter as matter, that is, every particle of matter, to be as well cogitative as extended, they will have as hard a task to make out to their own reasons a cogitative being out of incogitative particles, as an extended being out of unextended parts, if I may so speak.
15. II. If all matter does not think, I next ask, Whether it be only one atom that does so? This has as many absurdities as the other; for then this atom of matter must be alone eternal or not. If this alone be eternal, then this alone, by its powerful thought or will, made all the rest of matter. And so we have the creation of matter by a powerful thought, which is that the materialists stick at; for if they suppose one single thinking atom to have produced all the rest of matter, they cannot ascribe that pre-eminency to it upon any other account than that of its thinking, the only supposed difference. But allow it to be by some other way which is above our conception, it must still be creation; and these men must give up their great maxim, Ex nihilo nil fit. If it be said, that all the rest of matter is equally eternal as that thinking atom, it will be to say anything at pleasure, though ever so absurd. For to suppose all matter eternal, and yet one small particle in knowledge and power infinitely above all the rest, is without any the least appearance of reason to frame an hypothesis. Every particle of matter, as matter, is capable of all the same figures and motions of any other; and I challenge any one, in his thoughts, to add anything else to one above another.
16. III. If then neither one peculiar atom alone can be this eternal thinking being; nor all matter, as matter, i.e. every particle of matter, can be it; it only remains, that it is some certain system of matter, duly put together, that is this thinking eternal Being. This is that which, I imagine, is that notion which men are aptest to have of God; who would have him a material being, as most readily suggested to them by the ordinary conceit they have of themselves and other men, which they take to be material thinking beings. But this imagination, however more natural, is no less absurd than the other: for to suppose the eternal thinking Being to be nothing else but a composition of particles of matter, each whereof is incogitative, is to ascribe all the wisdom and knowledge of that eternal Being only to the juxta-position of parts; than which nothing can be more absurd. For unthinking particles of matter, however put together, can have nothing thereby added to them, but a new relation of position, which it is impossible should give thought and knowledge to them.
17. But further: this corporeal system either has all its parts at rest, or it is a certain motion of the parts wherein its thinking consists. If it be perfectly at rest, it is but one lump, and so can have no privileges above one atom.
If it be the motion of its parts on which its thinking depends, all the thoughts there must be unavoidably accidental and limited; since all the particles that by motion cause thought, being each of them in itself without any thought, cannot regulate its own motions, much less be regulated by the thought of the whole; since that thought is not the cause of motion, (for then it must be antecedent to it, and so without it,) but the consequence of it; whereby freedom, power, choice, and all rational and wise thinking or acting, will be quite taken away: so that such a thinking being will be no better nor wiser than pure blind matter; since to resolve all into the accidental unguided motions of blind matter, or into thought depending on unguided motions of blind matter, is the same thing: not to mention the narrowness of such thoughts and knowledge that must depend on the motion of such parts. But there needs no enumeration of any more absurdities and impossibilities in this hypothesis (however full of them it be) than that before mentioned; since, let this thinking system be all or a part of the matter of the universe, it is impossible that any one particle should either know its own, or the motion of any other particle, or the whole know the motion of every particle; and so regulate its own thoughts or motions, or indeed have any thought resulting from such motion.
18. Others would have Matter to be eternal, notwithstanding that they allow an eternal, cogitative, immaterial Being. This, though it take not away the being of a God, yet, since it denies one and the first great piece of his workmanship, the creation, let us consider it a little. Matter must be allowed eternal: Why? because you cannot conceive how it can be made out of nothing: why do you not also think yourself eternal? You will answer, perhaps, Because, about twenty or forty years since, you began to be. But if I ask you, what that you is, which began then to be, you can scarce tell me. The matter whereof you are made began not then to be: for if it did, then it is not eternal: but it began to be put together in such a fashion and frame as makes up your body; but yet that frame of particles is not you, it makes not that thinking thing you are; (for I have now to do with one who allows an eternal, immaterial, thinking Being, but would have unthinking Matter eternal too;) therefore, when did that thinking thing begin to be? If it did never begin to be, then have you always been a thinking thing from eternity; the absurdity whereof I need not confute, till I meet with one who is so void of understanding as to own it. If, therefore, you can allow a thinking thing to be made out of nothing, (as all things that are not eternal must be,) why also can you not allow it possible for a material being to be made out of nothing by an equal power, but that you have the experience of the one in view, and not of the other? Though, when well considered, creation of a spirit will be found to require no less power than the creation of matter. Nay, possibly, if we would emancipate ourselves from vulgar notions, and raise our thoughts, as far as they would reach, to a closer contemplation of things, we might be able to aim at some dim and seeming conception how matter might at first be made, and begin to exist, by the power of that eternal first Being: but to give beginning and being to a spirit would be found a more inconceivable effect of omnipotent power. But this being what would perhaps lead us too far from the notions on which the philosophy now in the world is built, it would not be pardonable to deviate so far from them; or to inquire, so far as grammar itself would authorize, if the common settled opinion opposes it: especially in this place, where the received doctrine serves well enough to our present purpose, and leaves this past doubt, that the creation or beginning of any one SUBSTANCE out of nothing being once admitted, the creation of all other but the CREATOR himself, may, with the same ease, be supposed.
19. But you will say, Is it not impossible to admit of the making anything out of nothing, since we cannot possibly conceive it? I answer, No. Because it is not reasonable to deny the power of an infinite being, because we cannot comprehend its operations. We do not deny other effects upon this ground, because we cannot possibly conceive the manner of their production. We cannot conceive how anything but impulse of body can move body; and yet that is not a reason sufficient to make us deny it possible, against the constant experience we have of it in ourselves, in all our voluntary motions; which are produced in us only by the free action or thought of our own minds, and are not, nor can be, the effects of the impulse or determination of the motion of blind matter in or upon our own bodies; for then it could not be in our power or choice to alter it. For example: my right hand writes, whilst my left hand is still: What causes rest in one, and motion in the other? Nothing but my will,- a thought of my mind; my thought only changing, the right hand rests, and the left hand moves. This is matter of fact, which cannot be denied: explain this and make it intelligible, and then the next step will be to understand creation. For the giving a new determination to the motion of the animal spirits (which some make use of to explain voluntary motion) clears not the difficulty one jot. To alter the determination of motion, being in this case no easier nor less, than to give motion itself: since the new determination given to the animal spirits must be either immediately by thought, or by some other body put in their way by thought which was not in their way before, and so must owe its motion to thought: either of which leaves voluntary motion as unintelligible as it was before. In the meantime, it is an overvaluing ourselves to reduce all to the narrow measure of our capacities, and to conclude all things impossible to be done, whose manner of doing exceeds our comprehension. This is to make our comprehension infinite, or God finite, when what He can do is limited to what we can conceive of it. If you do not understand the operations of your own finite mind, that thinking thing within you, do not deem it strange that you cannot comprehend the operations of that eternal infinite Mind, who made and governs all things, and whom the heaven of heavens cannot contain.