TOPSIS Algorithm

The Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) is a multi-criteria decision analysis method. It suggests that the chosen alternative should have the shortest geometric distance from the positive ideal solution and the longest geometric distance from the negative ideal solution.

Mathematical Steps:

1. Create Decision Matrix:
\[ X = (x_{ij})_{m \times n} \]
2. Normalize the Decision Matrix:
\[ r_{ij} = \frac{x_{ij}}{\sqrt{\sum_{i=1}^{m} x_{ij}^2}} \]
3. Calculate Weighted Normalized Matrix:
\[ v_{ij} = w_j \times r_{ij} \]
4. Determine Ideal Best (\(A^*\)) and Ideal Worst (\(A^-\)) Solutions:
\[ A^* = \{ \max(v_{ij} | j \in J), \min(v_{ij} | j \in J’) \} \] \[ A^- = \{ \min(v_{ij} | j \in J), \max(v_{ij} | j \in J’) \} \]
5. Calculate Separation Measures:
\[ S_i^* = \sqrt{\sum (v_{ij} – v_j^*)^2} , \quad S_i^- = \sqrt{\sum (v_{ij} – v_j^-)^2} \]
6. Calculate Relative Closeness:
\[ C_i^* = \frac{S_i^-}{S_i^* + S_i^-} \]

Real-World Application: Selecting a Smartphone

Goal: Select the best smartphone among 4 alternatives based on 4 criteria: Price (Cost), Battery (Benefit), RAM (Benefit), and Camera (Benefit).

ModelPrice ($)Battery (mAh)RAM (GB)Camera (MP)
Phone A8004000848
Phone B6005000664
Phone C1200450012108
Phone D5003500432

The Calculation Result:

After applying normalization and weighing (Equal weights of 0.25), we calculate the Performance Score (C):

  • Phone C (Best performance but expensive)
  • Phone B (Great battery/price balance)

In this scenario, Phone B often wins because it is closest to the ideal battery life while being far from the “worst” price.

Interactive TOPSIS Calculator

Enter values for 4 alternatives and 4 attributes.

Weights →
Alt \ AttrAttr 1Attr 2Attr 3Attr 4
Alt 1
Alt 2
Alt 3
Alt 4
Results will appear here…
Math Tools

Designed by: Dr. M.U. Mirza

Mathematical Researcher & Educator

Machine Learning Fuzzy Sets Computational Math Graph Theory
I am a researcher and mathematician dedicated to the study and application of advanced mathematical models. I offer research guidance and personalized video lectures for students and professionals seeking deep insights into mathematics and computational sciences.
📢 Academic Update: Currently seeking University Faculty positions or Post-Doc research opportunities worldwide.
Get Math Tutoring & Guidance
Scroll to Top