Matrix Multiplication Shortest Path Calculator

Compute the product of two matrices and find the shortest path in a weighted graph using matrix multiplication method (min-plus matrix multiplication).

isCalculator Editorial Team Published by:
Reviewed by: Review Board
Last Updated:

Was this calculator helpful?

How to use this tool?

This calculator performs matrix multiplication in two modes: standard and min-plus (shortest path).

  1. Set matrix dimensions – Enter the number of rows and columns for Matrix A and Matrix B (1–4).
  2. Enter values – Type comma-separated numbers in row-major order (e.g., 1,2,3,4 for a 2×2 matrix).
  3. Choose multiplication type – Check "Use min-plus multiplication" for shortest path calculation; leave unchecked for standard multiplication.
  4. Calculate – Click Calculate. The result matrix and an explanation appear below.
  5. Clear – Click Clear to reset to default values.

Important: Matrix A's columns must equal Matrix B's rows. All values must be numbers. Min-plus multiplication computes each cell as the minimum sum of corresponding row/column entries, useful for shortest path problems.

Previous Results

Generate Charts
Result Inputs Date

Frequently Asked Questions

Min-plus multiplication replaces addition with minimum and multiplication with addition. It is used to compute shortest paths in weighted graphs.

Enter values as comma-separated numbers in row-major order. For example, a 2x2 matrix with values 1,2,3,4 means first row: 1,2; second row: 3,4.

Matrices can be up to 4x4. Ensure that the number of columns in Matrix A equals the number of rows in Matrix B.

Reviewed by Experts

Eurico José Kiala

Eurico José Kiala

Mathematician

Teacher

LinkedIn
João Lino

João Lino

Mathematician

LinkedIn
Quick Convert
Length Converter
0
Weight/Mass Converter
0
Area Converter
0
Volume Converter
0
Speed Converter
0
Temperature Converter
0
Pressure Converter
0
Energy Converter
0
Power Converter
0
Force Converter
0
Time Converter
0
Angle Converter
0
Fuel Consumption Converter
0
Data Storage Converter
0
Base Numbers Converter
0
Dry Volume Converter
0
Currency Converter
0
Text Case Converter
0