Let
Compute .
Add before squaring, and do not expand the binomial. It is tempting to write , but that identity requires , which matrices generally do not satisfy. Adding first avoids the issue entirely and is also far less arithmetic.
Add the matrices entrywise. Both are , so the sum is defined:
Set up the squaring as S·S. Each entry of is the dot product of a row of with a column of . The columns of are , and .
Compute the first row.
Compute the second and third rows.
Assemble the result.
Check the third column quickly. Every entry of the third column of equals , so the third column of must be (row sums of ): the row sums are , and , giving , and — matching the computed values and confirming the arithmetic.
Need to solve a different problem like this? Open the solver →