Market power is known as the ability of units and generation companies (GenCos) to change electricity price profitably. As cleared in the definition, locational marginal price (LMP) is the most important key in market power evaluation. Therefore, the main objective of the paper is to analyze market power of units and GenCos based on their abilities to change electricity price. At the first step, using Karush-Kuhn-Tucker (KKT) conditions of Lagrangian method, LMP is decomposed into four main components. These components indicate the share of each unit at the LMP of each bus. These values are calculated by the proposed analytical method, and cannot be obtained using simulation methods. At the second step, ''unit-based LMP_S'' index, which indicates the contribution factor of each unit at LMP of each bus, is proposed as a new structural market power index. This index is also used as an effective tool to determine the most profitable coalition between two units. Using that, the market operator can predict highly potential collusions. Moreover, ''GenCosbased LMP_S'' index is proposed. Using this effective tool, the contribution of each GenCo, which owns multiple units in various buses, at the LMP of each bus is discovered. The proposed market power indices are calculated on the IEEE 24-bus test system and compared with some conventional structural market power indices. Incremental profits of units due to change of unit's strategies verify the accuracy of proposed method.