# Definition, adding & subtracting of matrices

## Definition of Matrix

Numbers in a rectangular system are called a martrix.

Matrix is a rectangular array of numbers, arranged in rows and columns.

The dimension of the matrix is always determined first by the number of rows and then by the number of columns.

$A=\left[\begin{array}{cccc}{a}_{1,1}& {a}_{1,2}& \cdots & {a}_{1,m}\\ {a}_{2,1}& {a}_{2,2}& \cdots & {a}_{2,m}\\ ⋮& ⋮& ⋮& ⋮\\ {a}_{n,1}& {a}_{n,2}& \cdots & {a}_{n,m}\end{array}\right]$

## Adding & subtracting of matrices

The addition (subtraction) of matrices is an operation of adding (subtracting) corresponding elements of two or more matrices.
A matrix can only be added to (or subtracted from) another matrix if the two matrices have the same dimensions.

$C=A±B$
${C}_{\left[i,j\right]}={A}_{\left[i,j\right]}±{B}_{\left[i,j\right]}$

Example

$C=A+B=\left[\begin{array}{ccc}{1}& 3& 2\\ 1& 0& 0\\ 1& 2& 2\end{array}\right]+\left[\begin{array}{ccc}{8}& 0& 5\\ 7& 5& 0\\ 2& 1& 1\end{array}\right]=$

$=\left[\begin{array}{ccc}{1}{+}{8}& 3+0& 2+5\\ 1+7& 0+5& 0+0\\ 1+2& 2+1& 2+1\end{array}\right]=\left[\begin{array}{ccc}{9}& 3& 7\\ 8& 5& 0\\ 3& 3& 3\end{array}\right]$

Keywords: Definition, adding & subtracting matrices