Abbreviations: "LO" indicates the Lennon-Olscamp translation of The Search after Truth; "JS" indicates the Jolley-Scott edition of Dialogues on Metaphysics and on Religion; "OC" indicates not a county in California but the Oeuvres Complètes. Footnotes are indicated by bracketed numbers.
Digression on Infinity and Ideas
...As we shall see, Malebranche’s thoughts on the infinite show quite clearly that theory of ideas subserves this greater project of formulating a theory of Reason.
A good place to start, when considering Malebranche’s view of the infinite, is geometry. We have, one could say, an idea of extension, which has no limits; it is an infinite idea. Our minds cannot exhaust it. It cannot be a modification of our minds, since we are finite substances and therefore incapable of having the infinite as a modification of our substances. Our thought cannot, as it were, 'stretch' to measure out this infinite idea. Should we then say that we cannot really have such an idea? It might well seem tempting at this point to deny that we, as finite substances, conceive the infinite at all.  There is reason to think this too easy, however, and Malebranche provides a powerful little argument along these lines, which we can call the world traveler argument.
Suppose a man falls from the clouds to the earth. He has no prior experience of the earth, so he brings with him no preconceptions about it. He begins to walk in a straight line along one of the earth’s great circles. We will suppose as well that no features of the earth, e.g., mountain ranges or oceans, impede him. After he has been doing this for several days, he still has not found the end of his journey. If he is wise, he will not thereby assume the surface of the earth to be infinite; and, in fact, he is right, for if he walks long enough, he will eventually return to his starting point. The earth is finite. The idea of extension, however, is different; this idea is inexhaustible, and, says Malebranche, this is “because [the mind] sees it as actually infinite, because it knows very well it will never exhaust it” (JS 15).
The force of this argument can easily be missed, so it may perhaps be useful to look at it more closely.  Suppose our world traveler moves successively through points A, B, C, D, and E on the earth’s surface. In describing the whole journey he expects to make, he might write in his journal:
<A, B, C, D, E,...> ,
that is, "First A, then B, then C, then D, then E, and so on." Let us then contrast this with movement along the x-axis of a Cartesian grid. We might describe this as:
<0, 1, 2, 3, 4,...>,
that is, "First 0, then 1, then 2, then 3, then 4, and so on." Now we have an interesting contrast. In both descriptions we have used the ellipsis or "and so on" to gesture to a continuation of the series. The two gestures however, are almost palpably different. The "and so on" of the first series is not the same as the "and so on" of the second series. We might put the difference by describing the former as 'indefinite' and the latter as 'infinite'. The infinite is not merely a group of finite things combined with a gesture toward their continuation; it is something that can be recognized on its own without running through the series. We do not need to journey the entire x-axis to see that it has no end. We cannot adequately explain the infinite by taking a series of finite things and recognizing that it continues; it must continue in a particular way, namely, an infinite way. The infinite series does not just continue; it continues infinitely. This argument serves to show us that, finite though we may be, we do in some way perceive the infinite. Malebranche supports this claim with a further consideration. Geometry clearly deals with infinites (infinite lines, infinite divisibility, and so forth). The claims made by geometers, however, are not tentative judgments based on trial and error or analogy. Once you understand the mathematics, it is not necessary to test it out against the finite things we find in the world around us. In mathematics there seems to be some sense in which we simply 'see' that something is infinite.  The claim that we, though finite, really do in some way perceive the infinite, is a well-founded one.
Infinity is not a solitary case. Our conclusions about infinity imply conclusions about the universality or generality of our ideas. Malebranche, in fact, barely separates the two. If we take, for instance, the idea of a circle in general, "the idea of the general circle represents infinite circles and applies to them all" (JS 27). Such an idea has to apply not merely to the circles we have actually experienced, but to every possible circle. If you claim to have an idea of a circle insofar as it is a circle, but cannot apply it to every possible circle, then, properly speaking, you do not have the idea you claim to have. Malebranche uses this to develop an argument about universality parallel to that about infinity. Someone might hold that general ideas like that of a circle are either a confused assemblage of particular ideas or something formed out of such an assemblage. Let us suppose we have encountered five circles, one, two, three, four and five units in diameter, respectively. The fact that we need to it to be applicable to infinite possible circles means that, for the reasons given above, this assemblage of circles cannot be our idea of circle in general. Any such assemblage will be finite, no matter how confused we made it, applying only to the region of all possible circles from which we have gathered our particular circles. Such an assemblage, intended to indicate circles universally, could not be distinguished from the same assemblage intended to refer only to this region of possible circles, without already having a universal idea.
The view that we form the idea of circle in general from the circles we have actually experienced fares somewhat better, although it, too, is rejected:
It is false in the sense that there is sufficient reality in the idea of five or six circles to form the idea of a circle in general from them. But it is true in the sense that, having recognized that the size of circles does not change their properties, you have perhaps stopped considering them one after the other according to their determinate size., in order to consider them in general according to an indeterminate size. Thus, you have, as it were, formed the idea of circle in general, by spreading the idea of generality over the confused ideas of circles you imagined. (JS 27)
In other words, the cardinal difficulty with this attempt is one of explanation. While this view purports to explain how we get our idea of circle in general, the explanans is not adequate to the explanandum. In a more subtle way it runs into exactly the same problem the previous view did, since the assemblage of circles in itself does not provide what is needed in order to have an idea of circle in general rather than just of some circles. This is a problem analogous to the one we saw with infinity. Just as we cannot shift from indefinite continuation to infinite continuation without already appealing to the infinite, so we cannot shift from a confused composite to a general idea without appealing to generality itself; and, as Malebranche has Theodore say, "I maintain you could form general ideas only because you find enough reality in the idea of the infinite to give the idea of generality to your ideas" (JS 27). We cannot explain our having ideas of infinite possible application without allowing something recognizably infinite from the very beginning, and the same is true of universality. Nor are these two properties the only problematic ones. Considerations like these will continue to cascade into cases, like necessity, that are closely connected to issues of infinity and generality. If naturalizing something means reducing it to, or explaining it in terms of, something more manageably finite, our ideas cannot be naturalized.
I wish to insist on the strength of the position just discussed. Malebranche’s arguments do not, I think, admit of any easy evasion. One cannot evade the argument, for instance, by making a distinction in ideas between perceptions and objects and arguing that our ideas are formally finite while objectively infinite. If the 'objectively infinite' aspect of the idea is part of the 'formally finite' aspect, i.e., if the object is in any sense part of the perception, then it is not clear that the distinction has evaded the problem at all. If the 'objectively infinite' is completely different from the 'formally finite,' then it is unclear why this is not conceding the whole argument. In fact, it is unclear what would distinguish this from Malebranche’s own solution; while it is not Malebranche’s preferred way of describing his position, it is a fairly accurate characterization of it. 
This returns us to our original puzzle about the origin of these infinite (general, necessary, etc.) ideas. Since we cannot resolve the matter by explaining it away as any sort of illusion, confusion, or extrapolation, given that we clearly do perceive the infinite in some way, we need another solution. Malebranche provides one in his thesis about the vision in God. The basic elements of the argument for this solution are the following:
1. We perceive ideas that are infinite.
2. We are finite.
3. Nothing that is finite can represent the infinite.
4. Therefore there is an infinite something other than ourselves in which we perceive ideas, i.e., God. 
At this point it is a good idea to stop and ask ourselves where Malebranche intends to go with this line of thought, which is often called the 'argument from properties'.  It is easy to think that the point of this is just to establish a particular theory of ideas, namely, the vision in God thesis. There is good reason, however, to think that Malebranche has more in view. In all the cases in which Malebranche gives or alludes to his infinite ideas argument, he makes or has made some link between it and universal Reason. This is least obvious in the discussion of Descartes’s argument in Search 4.11, where the mentions are brief and oblique: one reference to divine self-knowledge and another to the eternal model in God’s essence. On their own they could easily be interpreted in ways having nothing to do with Malebranche’s frequent mentions of sovereign Reason, the interior Teacher, and the like. The thing we need to keep in mind, however, is that The Search after Truth is an unwise place to make an argument from silence, or even simplicity of interpretation. The Search, although it is a rich lode of Malebranche’s thought, is not devoted to expounding that thought in a systematic form. Instead, it is concerned with teaching how to avoid error in inquiry. Because of this, Malebranche’s substantial views are presented in a disjointed way, often as mere examples or asides to illustrate or qualify the more methodological concerns of the text. The discussion of Descartes’s argument is a good example of this; it occurs as an illustrative example in a discussion of how love of sensible pleasure can prejudice people against the truth. To see the proper context of Malebranche’s thought, we must look elsewhere; and what we seem to find is that the infinite ideas argument is generally used to contribute to a theory of Reason. The entire Dialogues, for instance, presents itself a discussion presupposing the centrality of universal Reason. The very first speech given to Theodore, Malebranche’s primary spokeseman in the Dialogues, shows this clearly:
Let us attempt to have nothing prevent us each from consulting our common master, universal Reason. For it is inner truth that must govern our discussion. This is what must dictate to me what I should tell you and what you are to learn through me. (JS 3)
The actual discussion of the infinite ideas argument we have just considered is for the express purpose of clarifying the nature of universal Reason. Thus Theodore asks Aristes, his interlocutor, "Do you now know what that Reason is, about which so much is said in this material and terrestrial world, but of which so little is known there?" and Aristes responds with a summary of the infinite ideas argument. The same theme occurs, somewhat less obviously, in the Tenth Elucidation to the Search, on the nature of ideas. The discussion of the nature of ideas there places ideas entirely within the context of universal Reason. The properties of ideas are not distinguished form those of universal Reason itself, because the argument that universal Reason is infinite, necessary, immutable, and therefore divine, is at the same time an argument that ideas are so. In other words, Malebranche considers the infinite ideas argument for God’s existence to be an argument that Reason itself, being infinite, is divine. The theory of ideas is one aspect of a theory of Reason. To one who knows what to look for, this is true even in the Search, since it is elsewhere quite clear that the eternal model in the divine substance, known through divine self-knowledge, is Reason. 
 There is another possible response, namely, to try to find a way around the argument by distinguishing formal from objective infinity. This will be considered more fully below.
 This account should be compared to Wittgenstein, Philosophical Investigations, I, § 208, on the ‘and so on’ that is, and the ‘and so on’ that is not, an abbreviated notation.
 Note that to reject this supplementary argument requires more than an appeal to the possibility of a finitistic mathematics; it requires the stronger and more controversial claim that mathematics can only be finitistic. All Malebranche needs for his argument is the conclusion that mathematical use of infinites can make sense; if this is so, then when we think of the infinite, we really are thinking of the infinite rather than something else (e.g., a confusion, or indefiniteness).
 For hints toward an argument like the one I am suggesting here, see Malebranche’s discussion of Arnauld and Descartes on the objective reality of ideas in Trois Lettres, I, Rem. III (OC 6:214-218). See also OC 6:58, to which he refers in this passage.
 Identifying this something other than ourselves in which we perceive ideas as God is not as much of a leap as it may seem. It does presuppose the Cartesian view that God is infinite being, but nothing more than that, and can largely be considered simply a verbal issue. Also, it should be kept in mind that, while I only list infinity here, there are other properties closely related to infinity that also are in play because they follow patterns similar to infinity: universality, necessity, and so forth.
 See Nadler, Malebranche and Ideas, 92-97; Pyle, Malebranche, 57-61.
 For an excellent summary of these aspects of Malebranche’s theory of Reason, with the relevant references, see Reid, "Malebranche on Intelligible Extension," British Journal for the History of Philosophy (November 2003) 587-589.