| n | Matrix | Expected | Notes |
|---|---|---|---|
| 2 | [[1, 4], [4, 9]] |
Symmetric | Exact equality across the diagonal. |
| 3 | [[1, 2, 3], [2, 5, 6], [3, 6, 9]] |
Symmetric | Matches its transpose. |
| 3 | [[1, 2, 0], [3, 4, 5], [0, 5, 6]] |
Not symmetric | Because a12 ≠ a21 (2 vs 3). |
| 3 | [[1, 0.3001, 2], [0.3, 4, 5], [2, 5, 6]] |
Depends | With ε=0.001 it passes; with ε=0 it fails. |
A square matrix A is symmetric when it equals its transpose: A = Aᵀ.
Entry-wise, symmetry means: aᵢⱼ = aⱼᵢ for every pair of indices (i, j).
This calculator also supports numeric tolerance: it checks whether |aᵢⱼ − aⱼᵢ| ≤ ε. That helps when values are rounded or measured.
- Choose Grid input or Paste matrix.
- Set the matrix size n (or auto-detect for paste).
- Enter values, then choose a tolerance ε.
- Click Check symmetry to see results above.
- Use Download CSV or Download PDF to save outputs.
Symmetry as a structural constraint
A matrix is symmetric when mirroring across the main diagonal changes nothing. This structure appears in covariance matrices, Gram matrices, and many undirected network models. Many numerical routines assume symmetry; for example, a real symmetric positive definite matrix is a typical input for Cholesky factorization. A quick symmetry check helps prevent silent failures, misleading eigenvalues, and downstream calculations that rely on paired relationships between variables. Storing one triangle can halve storage.
Comparison workload and scaling
The calculator verifies pairs only once by scanning the upper triangle (i<j). That means it performs n(n−1)/2 comparisons, which is O(n²) time, while diagonal entries need no comparison. For n=10, that is 45 checks; for n=1000, it is 499,500 checks. The transpose and difference tables are derived directly from A, and the mismatch list reports the first set of violating pairs for inspection in practical reviews.
Tolerance for real-world numbers
Exact equality is often too strict for decimals created by rounding or floating-point arithmetic. The tolerance ε lets you accept small deviations when |aᵢⱼ−aⱼᵢ|≤ε. Use ε=0 for symbolic or exact data. For computed outputs, values like 1e−9 to 1e−6 are common; for measured data, 1e−4 to 1e−2 may be practical. For large values, scale inputs or use a relative ε.
Reading transpose and difference outputs
The transpose Aᵀ swaps rows and columns, so any asymmetry becomes visible as mismatched off-diagonal entries. The difference matrix D=A−Aᵀ should be near zero everywhere for a symmetric matrix; otherwise, D shows signed direction and size of the disagreement. Large positive or negative values in D highlight where symmetry breaks and by how much. The mismatch table lists the index pair (i,j), both values, and Δ so you can correct data quickly.
Exporting evidence for review
Exports turn a quick check into shareable documentation. The CSV includes the summary, A, Aᵀ, D, and mismatch details, which fits well in spreadsheets and version control. The PDF report bundles the verdict, tolerance, and key tables for reviewers, along with a timestamp. This makes the tool useful for QA sign-off, tutoring, and reproducible research notes where you need to justify why a matrix was accepted or rejected.
FAQs
What is a symmetric matrix?
A symmetric matrix is a square matrix that equals its transpose, meaning aᵢⱼ = aⱼᵢ for every pair of indices. The main diagonal values can be anything because each diagonal entry mirrors itself.
Why must the matrix be square?
Symmetry compares A[i,j] with A[j,i]. That pairing only exists when row and column counts match. If the matrix is not n×n, it cannot equal its transpose.
How does tolerance (ε) affect the verdict?
With ε>0, the check accepts small numerical differences: it passes when |aᵢⱼ−aⱼᵢ|≤ε. Use ε=0 for exact comparisons and raise ε for rounded or noisy data.
What do the mismatch indices mean?
Indices (i,j) identify a pair above the diagonal where A[i,j] and A[j,i] differ beyond ε. Use those positions to locate the exact inputs causing failure and fix only the needed cells.
How should I paste a matrix?
Put one row per line (or separate rows with semicolons). Separate columns with spaces or commas. The pasted matrix must be square, and auto-detect can set n from the text.
Why do transpose and difference tables help?
Aᵀ makes the mirror values explicit, while D=A−Aᵀ shows the signed error at each position. Near-zero entries indicate good symmetry; larger values show where and how symmetry breaks.