Matrix Squared Calculator – A² for 2×2 and 3×3
This calculator computes the square of a 2×2 or 3×3 matrix, i.e. the product A × A. Enter the matrix elements and get the resulting squared matrix instantly.
Matrix Square Solver
Matrix Squared Formula
Where:
- \(A\) — a square matrix (2×2 or 3×3) with elements \(A_{ij}\)
- \(C = A^2\) — the matrix squared, obtained by multiplying \(A\) by itself
- \(C_{ij}\) — the element in row \(i\), column \(j\) of the result
- \(n\) — the size of the matrix (2 or 3)
Each element of the result is the dot product of a row of \(A\) with a column of \(A\), exactly as in ordinary matrix multiplication — just with both factors being the same matrix.
Matrix Squared – Calculation Example
Example: square the 2×2 matrix
\[ A = \begin{bmatrix} 2 & 1 \\ 1 & 4 \end{bmatrix} \]
\[ A^2 = A \times A = \begin{bmatrix} 2\cdot 2 + 1\cdot 1 & 2\cdot 1 + 1\cdot 4 \\ 1\cdot 2 + 4\cdot 1 & 1\cdot 1 + 4\cdot 4 \end{bmatrix} = \begin{bmatrix} 5 & 6 \\ 6 & 17 \end{bmatrix} \]
Result: \( A^2 = \begin{bmatrix} 5 & 6 \\ 6 & 17 \end{bmatrix} \)
How to Use the Calculator
- Select the matrix size in the Select matrix size field: 2×2 or 3×3. Choosing 3×3 reveals the extra input fields.
- The squared matrix appears immediately in the Matrix Squared result panel.
Enter the matrix elements in the fields a₁₁, a₁₂, … according to the row and column of each element. For a 2×2 matrix you fill in a₁₁, a₁₂, a₂₁, a₂₂; for a 3×3 matrix all nine fields.
What Does It Mean to Square a Matrix?
Squaring a matrix means multiplying it by itself: \(A^2 = A \times A\). This is not the same as squaring each element individually — that would be elementwise (Hadamard) squaring and gives a completely different result. Matrix squaring follows the standard row-by-column multiplication rule, so every element of \(A^2\) mixes values from different rows and columns of \(A\).
Only square matrices (same number of rows and columns) can be squared. A rectangular matrix such as 2×3 cannot be multiplied by itself, because the number of columns of the left factor must equal the number of rows of the right factor.
Squaring appears in many applications: it represents applying the same linear transformation twice (useful in computer graphics, Markov chains and graph theory, where \(A^2\) counts paths of length 2 between nodes), it appears in matrix polynomials and recurrences such as \(x_{k+1} = A x_k\), and it is a building block for computing higher matrix powers \(A^m\) by repeated squaring.
A useful check on your result: \(\det(A^2) = \det(A)^2\). For the example above, \(\det(A) = 2\cdot4 - 1\cdot1 = 7\) and \(\det(A^2) = 5\cdot17 - 6\cdot6 = 49 = 7^2\). If you need to verify or compute this, our Determinant Multiplication calculator can help.
Assumptions, Limitations and Tips
- Square matrices only. The calculator accepts 2×2 and 3×3 matrices. It cannot square rectangular matrices.
- Not elementwise. Remember that \((A^2)_{ij} \neq (A_{ij})^2\) in general. If you need each element squared separately, that is a different operation.
- Order does not matter here. For a matrix multiplied by itself, \(A \times A\) is unambiguous. But note that in general matrix multiplication is not commutative — \(A \times B \neq B \times A\). Use the Matrix Multiplication calculator for products of two different matrices.
- Negative and decimal values are accepted; results are shown rounded to two decimal places.
- Identity and diagonal shortcuts. If \(A\) is diagonal, \(A^2\) is diagonal with squared diagonal entries; if \(A = I\), then \(A^2 = I\). These are quick sanity checks for your input.
- Squaring relates to eigenvalues: each eigenvalue \(\lambda\) of \(A\) becomes \(\lambda^2\) in \(A^2\). You can explore this with the Eigenvalues and Eigenvectors 2×2 and Eigenvalues and Eigenvectors 3×3 calculators.
Frequently Asked Questions
How do I square a 2×2 matrix by hand?
For \(A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}\), the square is \(A^2 = \begin{bmatrix} a^2 + bc & ab + bd \\ ac + cd & bc + d^2 \end{bmatrix}\). Work through each element as a row-times-column dot product. For example, the top-left entry is the first row of \(A\) multiplied by the first column of \(A\): \(a \cdot a + b \cdot c\). Double-check each term, as mixing up rows and columns is the most common slip.
Why isn't my answer just each element squared?
Because matrix squaring uses matrix multiplication, not elementwise operations. The elementwise square \(\begin{bmatrix} a^2 & b^2 \\ c^2 & d^2 \end{bmatrix}\) is a different operation (the Hadamard square) and gives different numbers in almost all cases. Only diagonal matrices coincide: if all off-diagonal entries are zero, both methods return the same result, since each row only "sees" its own column.
Can I square a matrix with negative or decimal entries?
Yes. The calculator accepts negative numbers and decimals, and the standard multiplication rules apply unchanged. Watch signs carefully: products of two negatives become positive, which frequently changes intermediate sums. Results are displayed rounded to two decimal places, so a value like 12.999999 from decimal inputs will appear as 13.00 — that is rounding, not an error.
What matrices satisfy A² = A or A² = I?
A matrix with \(A^2 = A\) is called idempotent — projections and the identity matrix are classic examples. A matrix with \(A^2 = I\) is called involutory, meaning it is its own inverse; a simple 2×2 example is \(\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\). If your input is one of these, the result should equal the input (or the identity), which makes a quick sanity check.
If A is symmetric, will A² also be symmetric?
Yes. If \(A = A^T\), then \((A^2)^T = (A \times A)^T = A^T \times A^T = A \times A\), so the square is symmetric too. This gives you a free verification: for a symmetric input, the two off-diagonal entries of the 2×2 result must match, and the 3×3 result must be symmetric across its main diagonal. If they don't, you made an arithmetic error somewhere.
How do I square a 4×4 or larger matrix?
The same rule applies at any size: each element \((A^2)_{ij}\) is the dot product of row \(i\) with column \(j\) of \(A\). This calculator is limited to 2×2 and 3×3, but for larger matrices you can either apply the rule by hand or use repeated multiplication. To compute higher powers like \(A^4\) or \(A^8\), use repeated squaring: \(A^4 = (A^2)^2\), which needs far fewer multiplications than multiplying \(A\) by itself over and over.
What are common mistakes when squaring a matrix?
The top errors are: squaring elements individually instead of multiplying matrices; reading the second factor's columns as rows; forgetting a cross term like \(bc\) in the 2×2 formula; and sign errors with negative entries. A reliable check is \(\det(A^2) = \det(A)^2\) — if the determinants don't satisfy this identity, at least one entry of your result is wrong.