Calculator Form
Enter one row per line and separate values with commas.
Examples: 3+2i, -4i, 5, 2-i.
Accepted input style
Write each row on a new line. Separate columns with commas.
Examples:
- 2×2 matrix: 1+i, 2
3-4i, -2i - 3×3 matrix: 1, i, 2-i
4+2i, -3, 5
i, 7, -2+i - Scalar: 2-3i
Example Data Table
| Example | Matrix A | Matrix B | Operation | Expected Result Snapshot |
|---|---|---|---|---|
| Example 1 | 2+i, 3-2i 1, 4+i |
1-i, 2 3+4i, -2i |
A + B | 3, 5-2i / 4+4i, 4-i |
| Example 2 | 2+i, 3-2i 1, 4+i |
1-i, 2 3+4i, -2i |
A × B | 14+10i, 2-11i / 7+17i, -2+2i |
| Example 3 | 2+i, 3-2i 1, 4+i |
Not needed | det(A) | 5 + 8i |
Formula Used
- Complex number: z = a + bi, where a is real and b is imaginary.
- Addition: (a + bi) + (c + di) = (a + c) + (b + d)i.
- Subtraction: (a + bi) - (c + di) = (a - c) + (b - d)i.
- Multiplication: (a + bi)(c + di) = (ac - bd) + (ad + bc)i.
- Matrix addition: C = A + B, done cell by cell.
- Matrix multiplication: C(i,j) = Σ A(i,k) × B(k,j).
- Conjugate: conj(a + bi) = a - bi.
- Transpose: Aᵀ swaps rows and columns.
- Hermitian transpose: Aᴴ = conj(A)ᵀ.
- Trace: tr(A) = Σ a(i,i) for square matrices.
- Determinant: computed here by complex Gaussian elimination.
- Inverse: A⁻¹ is found using Gauss-Jordan elimination, when det(A) ≠ 0.
- Magnitude: |a + bi| = √(a² + b²).
- Angle: θ = atan2(b, a), reported in degrees.
How to Use This Calculator
- Enter Matrix A using one row per line.
- Separate each column entry with a comma.
- Type complex values like 4+i, 3-2i, -i, or 5.
- Enter Matrix B when the operation needs two matrices.
- Enter a complex scalar when using scalar multiplication.
- Select the operation from the dropdown list.
- Choose how many decimal places you want displayed.
- Press the calculate button.
- Review the result above the form, including the graph.
- Use the CSV or PDF buttons to export the result.
Frequently Asked Questions
1) What input format should I use for complex matrix values?
Use one row per line and commas between columns. Valid entries include 3+2i, -4i, i, -i, and 7. Spaces are allowed because the parser removes them automatically.
2) Can this calculator handle non-square matrices?
Yes. Addition and subtraction need matching sizes, while multiplication needs compatible dimensions. Determinant, inverse, and trace require square matrices only.
3) What does the Hermitian option do?
It performs the conjugate transpose. First, each imaginary sign is flipped. Then rows and columns are swapped. This is important in linear algebra, signal processing, and quantum mechanics.
4) Why might the inverse fail?
An inverse exists only for square, non-singular matrices. If the determinant is zero, or numerically very close to zero, the matrix cannot be inverted.
5) What does the Plotly graph show?
For matrix results, the graph shows a heatmap of magnitudes for each result cell. For scalar results, it shows real part, imaginary part, and magnitude in one chart.
6) Can I export the result for reports or classwork?
Yes. Use the CSV button for spreadsheet-friendly output or the PDF button for a print-ready summary containing the result and key values.
7) Does the calculator show polar form too?
Yes. Matrix results include a polar-form table for each cell. Scalar results include magnitude, angle in degrees, and a polar representation.
8) What matrix size is supported here?
This version supports up to 5 rows and 5 columns per matrix. That keeps calculations fast, readable, and practical for most teaching and applied problems.