As already answered, the definition of the size of a galaxy must always to some extend be arbitrary. In astronomy, several definitions are used, according to the context in which it's used, e.g.:
- $R_{\mathrm{vir}}$ (the virial radius): Used when considering the galaxy's dynamics; defined by $GM_{\mathrm{vir}}/R_{\mathrm{vir}} \sim V^2$, where $G$ is the gravitational constant, $M_{\mathrm{vir}}$ is the mass inside the virial radius, and $V$ is the circular velocity (for disk galaxies) or velocity dispersion (for elliptical or irregular galaxies). For instance, if an initial density perturbation is smaller than its virial radius, it will collapse to form a galaxy. This radius is also the radius within particles will be gravitationally bound if their velocity does not exceed $V$.
- $R_{1/2}$ (the half-light radius): The radius within which half of the total observed light is emitted. This definition is useful when comparing the luminosity of galaxies.
- $R_{200}$: The radius within which the average density is equal to 200 times the average density of the Universe. Similarly, sometimes $R_{500}$ or $R_{1000}$ are used. These definitions make sense when discussing the mass of a galaxy, since beyond they sort of blend in to the intergalactic medium.