Add two 2x2 matrices by summing their corresponding elements. Each of the four positions is computed in one step. The state panel records each result element as it is filled in, building the result matrix entry by entry.

Example

Add matching entries of two matrices to build the result matrix one entry at a time.

highlighted = computed this step

Step 1 — Set up

Start with the two input matrices and an empty result matrix.

A=[1234],B=[2103],C=A+B=[]A=\begin{bmatrix}1&2\\3&4\end{bmatrix},\quad B=\begin{bmatrix}2&-1\\0&3\end{bmatrix},\quad C=A+B=\begin{bmatrix}\square&\square\\\square&\square\end{bmatrix}

Step 2 — Top-left entry

Add the top-left entry: 1 + 2 = 3.

C1,1=1+2=3,C=[3]C_{1,1}=1+2=3,\quad C=\begin{bmatrix}\hl{3}&\square\\\square&\square\end{bmatrix}

Step 3 — Top-right entry

Add the top-right entry: 2 + -1 = 1.

C1,2=2+(1)=1,C=[31]C_{1,2}=2+(-1)=1,\quad C=\begin{bmatrix}3&\hl{1}\\\square&\square\end{bmatrix}

Step 4 — Bottom-left entry

Add the bottom-left entry: 3 + 0 = 3.

C2,1=3+0=3,C=[313]C_{2,1}=3+0=3,\quad C=\begin{bmatrix}3&1\\\hl{3}&\square\end{bmatrix}

Step 5 — Bottom-right entry

Add the bottom-right entry: 4 + 3 = 7.

C2,2=4+3=7,C=[3137]C_{2,2}=4+3=7,\quad C=\begin{bmatrix}3&1\\3&\hl{7}\end{bmatrix}

Step 6 — Result

Read the completed result matrix.

C=A+B=[3137]C=A+B=\begin{bmatrix}3&1\\3&7\end{bmatrix}
matrix entry notation A[i,j] denotes the entry in row i, column j (1-indexed). Matrix addition requires both matrices to have the same dimensions.
element-wise operation Like vector addition, matrix addition operates element by element: (A + B)[i,j] = A[i,j] + B[i,j].