Tool Categories

Matrix A
Enter values and configure

Add/Sub/Hadamard: Same dimensions. Multiply: cols(A) = rows(B). Det/Inv/Trace: Square matrix.

Result
Calculation output

Configure matrices and click Compute

How to Use
  1. Choose mode :- Select "Single Matrix (A)" for individual operations or "Two Matrices (A & B)" for dual operations
  2. Set dimensions :- Choose rows and columns (1-4) for each matrix using the dropdowns
  3. Enter values :- Click each cell and type numbers, or use "Random" / "Identity" buttons to auto-fill
  4. Select operation :- Pick from Determinant, Inverse, Transpose, Trace, Scalar, Add, Subtract, Multiply, or Hadamard
  5. Click Compute :- View the result with step-by-step explanation on the right panel

Note: Maximum matrix size is 4×4. For Determinant, Inverse, and Trace, the matrix must be square (rows = cols).

Formulas & Reference

Determinant (det(A))

For a 2×2 matrix: det(A) = ad - bc

For larger matrices, uses cofactor expansion along the first row.

Inverse (A⁻¹)

A⁻¹ = (1/det(A)) × adj(A), where adj(A) is the adjugate (transpose of cofactor matrix). Only exists if det(A) ≠ 0.

Transpose (Aᵀ)

Swap rows with columns: Aᵀ[i][j] = A[j][i]. Rows become columns and vice versa.

Trace (tr(A))

Sum of diagonal elements: tr(A) = Σ A[i][i] for i = 0 to n-1.

Addition (A + B)

Element-wise addition: (A + B)[i][j] = A[i][j] + B[i][j]. Matrices must have same dimensions.

Multiplication (A × B)

(A × B)[i][j] = Σ A[i][k] × B[k][j] for k = 0 to cols(A). cols(A) must equal rows(B).

Scalar Multiplication

(c × A)[i][j] = c × A[i][j]. Multiply every element by the scalar constant.

Hadamard Product

(A ⊙ B)[i][j] = A[i][j] × B[i][j]. Element-wise multiplication, same as Addition dimensions.