For every compact set K in X, and for every open set U in Y, let B(K,U) be the collection of functions that map K into U. If you want to consider the empty set as compact, which I suppose it is, then B(∅,Y) includes every function. That's all right; the entire collection is suppose to be open. Similarly, B(X,∅) is empty, whence the empty collection of functions is open. (If X is not compact then choose any compact set in X, such as the point x.)

However, B(K,U) is not a base for the topology. Let's look at a simple example. Let X consist of two points a and b with the discrete topology, and let Y be the real line. Let G consist of functions that map a into the open interval (0,2), and let H map b into (2,4). Now G∩H is the set of functions, and there certainly are continuous functions like this, that map a into (0,2) and b into (2,4). Let f map a and b to 1 and 3 respectively. This should be contained in a base set, which is contained in the intersection. Restricting either a or b alone won't do, hence K is the entire domain X. Both images must be contained in an open set U. Clearly U contains 1 and 3. This brings in the function that maps both a and b to 1, and that is not part of G∩H. So these collections do not act as a base. However, they do act as a subbase, as we shall see below.

Consider all finite intersections of the sets B(K,U). This will act as the base for the compact open topology. (It is called "compact open" because K is compact and U is open.) The problem we ran into earlier, where G∩H was not covered by base sets, is now solved, because G∩H is automatically a base set. In other words, the intersection of two finite intersections is another finite intersection. So we have a base, and the arbitrary union of base sets is open in the compact open topology.

Of course we need to prove this is a base. Start with two open balls based on f1 K1 and r1, and f2 K2 and r2. Let g be a function in the intersection. Since K1 is compact, there is a distance d1 between f1 and g, across K1, and similarly there is a distance d2 between f2 and g across K2. Note that d1 < r1, and d2 < r2.

Let K3 be the union of K1 and K2. This is a compact set. Let ε be smaller than r1-d1 and r2-d2. The set of functions within ε of g across K3 is contained in our original open sets. This holds for every g in the intersection, hence we have a valid base, and a valid topology.

Consider a continuous function f from X into Y, and a distance ε. This defines an open ball of functions, a base set under compact convergence. We want to cover this ball with open sets under the compact open topology.

Let g be any function that is uniformly within ε of f. In other words, g is a point in our open ball.

Let d be the distance between g and f. Note that d < ε. Choose γ so that it is less than half the difference between ε and d.

Let a be an arbitrary point in K. Choose an open neighborhood about a whose image is within γ of g(a). Then restrict O to a (possibly smaller) base open set. Let C be the closure of O. Since X is locally compact, C is compact. Find such an Oa and Ca for each point a in K.

Now K is covered by open sets Oa, and a finite subcover will do. Hereinafter, consider the finite family of open sets Oa and their compact closures Ca.

Let Sa be the set of continuous functions that map Ca into the open ball of radius γ centered at g(a). Let S be the intersection over all Sa. This is an open set in the compact open topology. We need to prove every function in S is within ε of f.

Let b be an arbitrary point in K. Find a such that Oa contains b. Now S(b) is within γ of g(a). Also, g(b) is within γ of g(a). By the triangular inequality, S(b) and g(b) differ by no more than 2γ. This keeps S(b) within ε of f(b). The open set lies entirely within our ball. The open ball is indeed open relative to the compact open topology.

Let's look at the converse. Let S be the intersection over B(Ki,Ui). Let f be a function belonging to S. Focus in on a particular K and U. The image of K is a compact set, contained in the open set U. Place each point of the image in an open ball, inside U. Finitely many balls cover the image. Let r be the smallest radius. Any function within r of f still maps K into U. Of course we must deal with K1 through Kn, mapping into U1 through Un, but this is handled by setting r to the smallest radius across the board. Thus an open ball of functions, of radius r, centered at f, across the domains K1 through Kn, (the finite union of compact sets is compact), is contained in S. Thus S is covered by open balls, and is open under compact convergence.

When X is locally compact and Y is a metric space, the two topologies, compact open and compact convergence, are equivalent. The latter is often more convenient, since the open balls form a base, rather than a subbase. It is more intuitive to say, "The functions close to f on K", rather than "The finite intersection of functions that map various compact sets K into various open sets U." Of course X and Y could be exotic spaces, whence the compact open topology cannot be expressed in a simpler, equivalent form.