Semiconductor nanostructures based on two-dimensional electron gases (2DEGs) could form the basis of future devices for sensing, information processing and quantum computation. Although electron transport in 2DEG nanostructures has been well studied, and many remarkable phenomena have already been discovered (for example, weak localization, quantum chaos, universal conductance fluctuations), fundamental aspects of the electron flow through these structures have so far not been clarified. However, it has recently become possible to image current directly through 2DEG devices using scanning probe microscope techniques. Here, we use such a technique to observe electron flow through a narrow constriction in a 2DEG-a quantum point contact. The images show that the electron flow from the point contact forms narrow, branching strands instead of smoothly spreading fans. Our theoretical study of this flow indicates that this branching of current flux is due to focusing of the electron paths by ripples in the background potential. The strands are decorated by interference fringes separated by half the Fermi wavelength, indicating the persistence of quantum mechanical phase coherence in the electron flow. These findings may have important implications for a better understanding of electron transport in 2DEGs and for the design of future nanostructure devices.