Matrix mathematics has applications in analysis, computer programming, and engineering. A mathematical matrix is an array of elements in rows and columns.

- Video
- Matrix Definition
- What is a Square Matrix?
- Matrix Properties
- Identity Matrix
- Square Matrix Addition
- Square Matrix Multiplication

A **matrix** is an array of numbers, symbols or expressions in rows (across) and columns (up and down). The singular, *matrix*, is used when dealing with one matrix, like this:

$\left|\begin{array}{ccc}2& -8& 0\\ 1& 5& -13\end{array}\right|$

When you have more than one matrix, you have *matrices*. The number of rows and columns is always indicated in the same order, so the matrix above is a $2\times 3$ matrix, meaning two rows and three columns.

A **square matrix** is a special kind of matrix that has as many rows across as it has columns up and down. Here is a square matrix:

$\left|\begin{array}{ccc}11& 15& -7\\ 3& -2& 0\\ -5& 13& 4\end{array}\right|$

How would you identify this matrix?

Did you say $3\times 3$, since it has three rows and three columns?

In our square matrix above, the top row has three numbers: $11$, $15$, and $-7$. These are three **entries** or **elements**. The matrix itself can be noted with any letter, but every element in that matrix will use the same letter.

We will call our square matrix $A$, so all positions of all elements or entries are written as an a and then subscripts: ${a}_{r},c$ with the first letter $r$ referring to rows and the second letter $c$ referring to columns.

${a}_{\left(row\right)},\left(column\right)$

In our square matrix, the $11$ is in ${a}_{1},1$, the very first position for any entry, while the $-7$ is in the ${a}_{1},3$ position. The subscript ${}_{1}$ places it in the first row; the subscript ${}_{3}$ makes it the third entry or element.

What are the correct notations for the $-2$ in the second row, and the $13$ in the third row?

We hope you said ${a}_{2},2$ for the $-2$ and ${a}_{3},2$ for the $13$!

The smallest square matrix would be $2\times 2$; no limit exists in theory as to the largest size square matrix, but for practical use, anything over $10\times 10$ becomes difficult to mathematically manipulate.

A square matrix can be populated by elements or entries that are integers, fractions, algebraic expressions, or even symbols. Because a single entry could be something like ${x}^{2}+{y}^{3}=z$, a square matrix with only four rows and four columns could be challenging.

In computer programming, many matrices are filled with nothing but $0\text{'}s$ and $1\text{'}s$, the binary language of computing. When a square matrix has only $0\text{'}s$ in every entry except for a diagonal of $1\text{'}s$, the matrix is an **identity matrix**. This comes in handy in matrix multiplication, which we will get to below.

The identity matrix (all $0\text{'}s$ and a diagonal of $1\text{'}s$) gets its name because it is the matrix to multiply times another matrix that yields an answer identical to the other matrix; it gives back the matrix you started with, just a $1\times 5$ gives you back $5$, or $\mathrm{2,018}\times 1$ gives you an answer of $\mathrm{2,018}$.

You can add the elements in two matrices, but *only* if both matrices are the same size. You cannot add our first matrix, $2\times 3$, with our square matrix, $3\times 3$, because they do not have the same number of rows.

Even if they are both square matrices, you cannot add them if one is, say, $2\times 2$ and the other is $5\times 5$.

To add two square matrices of the same size, you need to keep track of each entry's position so you add like entries between the two matrices. So you add ${a}_{2},2+{b}_{2},2$; you add ${a}_{3},2+{b}_{3},2$, and so on. You need to work carefully so you do not lose track of your position as you move through the matrix.

Here are two small matrices:

$\left[\begin{array}{cc}4& 6\\ 5& 7\end{array}\right]+\left[\begin{array}{cc}6& 12\\ 9& 13\end{array}\right]$

Take each entry and its position: ${c}_{1},1$ is a $4$, while ${d}_{1},1$ is a $6$. You are adding $4+6$. The solution matrix will show $10$ in the position $1,1$.

What are the correct sums for the rest of the matrix?

$\left[\begin{array}{cc}4& 6\\ 5& 7\end{array}\right]+\left[\begin{array}{cc}6& 12\\ 9& 13\end{array}\right]=\left[\begin{array}{cc}\mathbf{10}& \mathbf{18}\\ \mathbf{14}& \mathbf{20}\end{array}\right]$

This works even if the entries contain negative numbers. You simply "add" the expressions, including the negative. Your answer matrix could contain entries that are positive or negative integers.

$\left[\begin{array}{cc}-5& 7\\ 11& -8\end{array}\right]+\left[\begin{array}{cc}4& 0\\ -2& 15\end{array}\right]$

For ${e}_{1},1$ the values are $-5+4=-1$, so the solution matrix has $-1$ at entry position $E+{F}_{1},1$. Can you plug in the other four values?

$\left[\begin{array}{cc}-5& 7\\ 11& -8\end{array}\right]+\left[\begin{array}{cc}4& 0\\ -2& 15\end{array}\right]=\left[\begin{array}{cc}\mathbf{-}\mathbf{1}& \mathbf{7}\\ \mathbf{9}& \mathbf{7}\end{array}\right]$

Subtraction works through the same way. Each entry position in the solution matrix is the difference of the two like entries, by position.

Square matrices can be multiplied. Matrices are multiplied either by whole numbers (scalar multiplication), or by other matrices. An easy way to remember what you are doing is to think that the number of rows of the first matrix must be equal to the number of columns of the second matrix. For square matrices, this headache is already taken care of.

To multiply two square matrices, you take each entry in the first *row* of the first matrix and multiply it times its matching entry in the first *column* of the second matrix. Once you have all these products, add them together!

Here are two very small matrices:

$\left[\begin{array}{cc}10& 5\\ 2& 4\end{array}\right]\times \left[\begin{array}{cc}6& 8\\ 3& 9\end{array}\right]$

To get the solution matrix for the first entry, i1, 1, we multiply entries from the first and second matrices' 1, 1 positions (10 x 6), then we multiply g1, 2 times h2, 1 (5 x 3). Add these two products together:

${i}_{1},1=(10\times 6)+(5\times 3)=75$

Repeat these steps for the other three entries. In our solution matrix, ${i}_{1},2$ will be the product of ${g}_{1},1\times {g}_{1},2$ added to the product of ${g}_{1},2\times {h}_{2},2$:

${i}_{1},2=(10\times 8)+(5\times 9)=125$

Can you figure out the other two on your own?

Did you get:

${i}_{2},1=24$

${i}_{2},2=52$

The order of matrices matters in multiplication; multiplying matrix $G\times H$ gives you a different answer than $H\times G$!

If you do not believe us, try it for yourself! You should get this:

$\left[\begin{array}{cc}6& 8\\ 3& 9\end{array}\right]\times \left[\begin{array}{cc}10& 5\\ 2& 4\end{array}\right]=\left[\begin{array}{cc}\mathbf{76}& \mathbf{62}\\ \mathbf{48}& \mathbf{51}\end{array}\right]$

After studying this lesson and trying the matrix mathematics, you are able to recall and explain what a matrix is, identify the rows, columns and elements of matrices, discern the unique properties of a square matrix, and describe what an identity matrix is. You are also able to perform operations of addition, subtraction, and multiplication using matrices.

After working your way through this lesson and video, you will be able to:

- Recall and explain what a matrix is
- Identify the rows, columns and elements of matrices
- Discern the unique properties of a square matrix
- Describe what an identity matrix is
- Perform operations of addition, subtraction, and multiplication using matrices

Instructor: **Malcolm M.**

Malcolm has a Master's Degree in education and holds four teaching certificates. He has been a public school teacher for 27 years, including 15 years as a mathematics teacher.

Malcolm has a Master's Degree in education and holds four teaching certificates. He has been a public school teacher for 27 years, including 15 years as a mathematics teacher.

Get better grades with tutoring from top-rated private tutors. Local and online.

View Tutors

Tutors online

Ashburn, VA

Get better grades with tutoring from top-rated professional tutors. 1-to-1 tailored lessons, flexible scheduling. Get help fast. Want to see the math tutors near you?

Learn faster with a math tutor. Find a tutor locally or online.

Get Started