Galaxy groups and clusters are structures comprising hundreds to thousands of galaxies bounded together by gravity. According to the concordance cosmology model, cluster sits on the top of the cosmos structural hierarchy. A direct evidence of existence of dark matter is that groups and clusters usually have much larger masstolight ratio. The average M/L in solar neighborhood is $\sim 5\Upsilon_\odot$. In large scope, stellar and gas masstolight ratio ranges from $0.5 \Upsilon_\odot$ to $30 \Upsilon_\odot$. Larger than $30 \Upsilon_\odot$ usually cannot be explained by stars and gases. Direct probes of group and cluster mass are galaxy velocity dispersion, XRay and gravitational lensing.
Galaxy Velocity Dispersion and XRay Spectrum
Mass of group or cluster can be inferred from their dynamics. Galaxies in groups or clusters bounded together by gravitational wall can be well assumed in
virial equilibrium. Applying
virial theorem, \[ \left< \epsilon_k \right> = \frac{1}{2} \left< \epsilon_p \right> \] where $\left< \epsilon_k \right>$ denotes the average unit kinetic energy and $\left< \epsilon_p \right> \simeq \frac{3}{5} \frac{G M}{R}$ is the average gravitational potential.
Galaxy velocities can be empirically fitted by Gaussian, $\exp\left[ (vv_0)^2/2\sigma_v^2 \right]$, where $\sigma_v$ is the velocity dispersion. Thus the virial mass of the system can be estimated as, \[ M \sim \frac{5}{3}\frac{R \sigma^2_v}{G}, \\ \Omega \sim \frac{5}{4\pi}\frac{\sigma_v^2}{G R^2 \rho_c}.
\]
90% baryons reside as intracluster media (ICM). These gases are heated to 10 to 100 MK due to gravitational energy and make good XRay sources. For ICM, $\left< \epsilon_k \right> \simeq \frac{3}{2} k_B T/\mu M_p $, where $T$ is the temperature and $\mu M_p$ is the gas molecule mass. The virial mass of the system is, \[ M \sim 5 \frac{R}{G \mu M_p} k_B T, \\ \Omega \sim \frac{15}{4 \pi} \frac{k_B T}{G R^2 \mu M_p \rho_c}
\]
Kent and Gunn (1982) measured the velocity dispersion of Coma cluster and found the masstolight ratio $M/L \sim 181 h^{1}_{50} \Upsilon_\odot, \Omega \sim 0.1$, confirming Zwicky's (1933) speculation of dark mass. Carlberg et al. (1997) measured a sample of 14 clusters, containing 1150 galaxies. The average cluster virial masstolight ratio is $213 \pm 59 h \Upsilon_\odot$, corresponding to density fraction $\Omega \sim 0.19 \pm 0.1$. In a number of study of our own Virgo supercluster, the velocity dispersion is determined to be around $250 \pm 20$ km/s, implying $\Omega = 0.2 \pm 0.1$. For compilation of investigation of cluster masses and masstolight ratio, see Trimble 1987.
These are various issues using virial theorem. As the start, clusters are not totally isolated and there is no clear boundary between them. $R$ has to be some length scale. Furthermore, the virial equilibrium assumption is also questionable, although there is no doubt that the system is equilibrating. Hence virial analysis can only provide an order of magnitude estimation. Virial mass determination can be calibrated and improved by Nbody simulation.
Gravitational Lensing
Mass deflects light traveling by. Just light optical lens bends light rays, this effect can also form image, known as gravitational lensing. Although light deflection in gravitational field has been discussed by several authors notably including Newton, Laplace, Cavendish (1978), Soldner (1803) and Einstein (1911, based on
equivalence principle), it was Albert Einstein (1915) first get the correct deflection angle $\Delta \theta = \frac{4 G M}{r}$, following his triumph of general relativity, and related it to gravitational lensing. Using gravitational lensing to measure nebulae mass was first suggested by Zwicky (1937) and confirmed by Walsh et al. in "Twin Quasar" system in 1979. Einstein first thought gravitational lensing was too rare to be useful. However, today gravitational lensing has superseded dynamical methods, as the most powerful mean of mass measurement.

Fig. 1: geometry of gravitational lensing. 
Strong Lensing In the strong lensing case, the size of the lens object is much smaller than the lenssource distance and lensobserver distance.
The image angle $\theta$ and source angle $\beta$ is related through deflection angle $\alpha$ (See the geometry configuration in Fig. 1), \[ \vec{\beta} = \vec\theta  \frac{D_{ds}}{D_s} \Delta \vec\alpha (\vec\theta) \equiv \vec\theta  \vec\alpha (\vec\theta ). \] The vector hats indicate the 2D nature of these angles. Different $\vec\theta$ may result the same $\vec\beta$, reflecting the possibility of multiimage formation. Under the
weak field approximation and
thin lens approximation, the deflection angle, \[ \vec\alpha = \frac{4G D_{ds}}{D_s} \int \mathrm{d}^3 x' \rho(x') \frac{\vec\zeta  \vec\zeta'}{(\vec\zeta  \vec\zeta')^2} \equiv \frac{4G D_{ds}}{D_s} \int \mathrm{d}^2 \zeta' \Sigma(\vec\zeta') \frac{\vec\zeta  \vec\zeta'}{(\vec\zeta  \vec\zeta')^2}, \] where $\vec\zeta$ and $\vec\zeta'$ are projected position vectors. It is convenient to use angular parameters, \[ \vec\alpha(\vec\theta) = 4 G \int \mathrm{d}^2 \theta' \sigma(\vec\theta')\frac{\vec\theta  \vec\theta'}{(\vec\theta  \vec\theta')^2} = \nabla \psi(\vec\theta), \] where $\sigma(\vec\theta) \equiv \Sigma(D_d \vec\theta') D_{ds}D_d/D_s$ is the projected density, $\psi = 4 G \int \mathrm{d}^2 \theta' \sigma(\vec\theta') \ln \left \vec\theta  \vec\theta' \right$ is angular potential. It can be shown it satisfies Poisson equation, \[ \nabla^2 \psi(\vec\theta) = 8 \pi G \sigma(\vec{\theta}). \] The local image distortion (See Fig. 2) is related to the
Jacobian matrix, \[ \partial \beta_i /\partial \theta_j = \delta_{ij}  \frac{\partial^2 \psi}{\partial \theta_i \partial \theta_j} = \mathbb{1}_{ij}  \left( \begin{array}{c c} \kappa + \gamma_1 & \gamma_2 \\ \gamma_2 & \kappa  \gamma_1 \\ \end{array} \right)_{ij} \]

Fig. 2: meaning of distortion parameters, $\gamma \equiv \gamma_1 + i \gamma_2$. Figure from Wikipedia. 
The resulted image would a ring, arc, or multiple images depending on the relative position and shapes of the lens and source (See Fig. 3).

Fig. 3: images of strong lensing. Left: An Einstein ring; Right: An Einstein cross. 
As an example, consider Einstein ring (Fig 3a). It occurs when the lens, source and the observer align on a straight line ($\beta = 0 $). The total mass of the lens system is \[ M = \frac{ d_S d_L} {4 G (d_S  d_L)} \theta_E^2 \] where $d$ is angular diameter distance and $\theta_E$ is the angular radius of the ring.
For more general strong lensing, the mass distribution of the lens can be reconstructed from reasonable modeling of the lens and source (see for Koopmans (2005) more technical details). Reconstruction of mass map (See Fig. 4) of CL0024+1654 from strong lensing by Type et al. (1998) shows 98% of the cluster mass is dark matter in $35 h^{1}$ kpc core.

Fig. 4: mass reconstruction of CL0024+1654 from strong lensing. Galaxies are shown in blue, dark matter distribution is shown in orange. 
weak lensing In weak lensing, light is deflected by large number of nonuniformly distributed mass a long its path. Thus the thin lens approximation fails. The Jacobi matrix has to be generalized as, \[ \partial \beta_i / \partial \theta_j = \delta_{ij}  \int_0^{\chi_h} \mathrm{d}\chi g(\chi) \frac{\partial^2 \Psi}{\partial \zeta_i \partial \zeta_j}, \] where $\zeta$ is transverse distance, $\Psi$ is Newtonian potential, $\chi$ is the comoving distance. The weight function is $g(\chi) = 2 r \int_{\chi}^{\chi_h} \mathrm{d} \chi' \; n(\chi') r(\chi  \chi')/r(\chi') $, where $n(\chi)$ is normalized lensing object distribution, $r = d_A/(1+z), d_A$ is the angular diameter distance, $\chi_h$ is the comoving distance to the horizon.
The image of the background galaxy is slightly distorted, known as cosmic shear. Statistical characteristics of the cosmic shear field provide valuable information of the lens system. Detailed projected mass can be reconstructed from it. Because the cosmic shear is only a few percent effect, it requires careful image processing. It turns out the point spread function (PSF) is one of the major sources of image distortion, which has to be corrected.
Cosmic shear has been observed by Van Waerbeke et al. (2000), Bacon et al. (2000) and Wittman et al.(2000). The observation is consistent with prediction from $\Lambda$CDM model. Clowe et a. (2006) compared the optical and XRay image with weak lensing mass reconstruction of a merging cluster system 1E0657556, and suggested the > 70% system mass is dark matter (See Fig. 5). The Hubble Space Telescope (HST) Cosmic Evolution Survey (COSMOS) project (2004  2005) led by Scoville measured 1.637 square degrees region, shape of half million distant galaxies, and used their distortion image to reconstruct the projected mass and mass evolution with redshift (See Fig. 6 and 7).

Fig. 5: observation of 1E0657556. Left: optical band; Right: XRay band. The mass contours are reconstructed from weak lensing. 

Fig. 6: Large scale structure mass distribution from COSMOS project. The total projected mass from weak lensing, is shown as contours in a and gray level in b c d; Stellar mass in blue; galaxy number density in yellow; hot gass in red. 

Fig. 7: Threedimensional reconstruction of the dark matter
distribution from COSMOS project. 
microlensing microlensing is a gravitational lensing by passby massive compact astronomical objects that causes background light source apparent brightening in a certain a mount of time (several months to years). Microlensing involves small and usually faint lenses such as dwarfs and blackholes. It provides a major mean to detect massive compact astronomical halo objects (MACHOs) including planets, red, brown and black dwarfs, neutron stars and black holes etc. Microlensing is very useful for baryonic dark matter detection. However, two surveys of MACHOs shows that they are insignificant of the overall halo mass.