A robust Particle Swarm Optimization (PSO) investigation for magnetic data by a 2D dipping dike has been presented. The interpretive model parameters are: the amplitude coefficient (K), the depth to the top of the dipping dike (z), exact origin of the dipping dike (x<sub>0</sub>), and the width of dipping dike (w). The inversion procedure is actualized to gauge the parameters of a 2D dipping dike structures where it has been confirmed first on synthetic models without and with different level of random noise. The results of the inversion demonstrate that the parameters derived from the inversion concur well with the true ones. The root mean square (RMS) is figured by the strategy which is considered as the misfit between the measured and computed anomalies. The technique has been warily and effectively applied to real data examples from China and UK with the presence of ore bodies. The present technique can be applicable for mineral exploration and ore bodies of dike-like structure embedded in the shallow and deeper subsurface.