# Square Matrix (Definition & Properties)

Written by
Malcolm McKinsey
Fact-checked by
Paul Mazzola

## Matrix definition

AÂ matrixÂ is an array of numbers, symbols or expressions in rows (across) and columns (up and down). Matrix mathematics has applications in analysis, computer programming, and engineering. A mathematical matrix is an array of elements in rows and columns.

The singular,Â matrix, is used when dealing with one matrix, like this:

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Â Ã—Â 32Â Ã—Â 3Â matrix, meaning two rows and three columns.

Get free estimates from math tutors near you.

## What is a square matrix?

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:

How would you identify this matrix?

Did you sayÂ 3Â Ã—Â 3, since it has three rows and three columns?

## Matrix properties

### Entry or element

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}_{\left(r,c\right)}$ with the first letterÂ rÂ referring to rows and the second letterÂ cÂ referring to columns.

In our square matrix, theÂ 11Â is inÂ ${a}_{\left(1,1\right)}$, the very first position for any entry, while theÂ -7Â is in theÂ ${a}_{\left(1,3\right)}$Â 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}_{\left(2,2\right)}$Â for theÂ -2Â andÂ ${a}_{\left(3,2\right)}$Â for theÂ 13!

### Sizing and filling matrix

The smallest square matrix would beÂ 2Â Ã—Â 2; no limit exists in theory as to the largest size square matrix, but for practical use, anything overÂ 10Â Ã—Â 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 ${a}_{\left(3,2\right)}$, a square matrix with only four rows and four columns could be challenging.

## Identity matrix

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

Get free estimates from math tutors near you.

The identity matrix (allÂ 0'sÂ and a diagonal ofÂ 1'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Â Ã—Â 5Â gives you backÂ 5, orÂ 2,018Â Ã—Â 1Â gives you an answer ofÂ 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Â Ã—Â 3, with our square matrix,Â 3Â Ã—Â 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Â Ã—Â 2Â and the other isÂ 5Â Ã—Â 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}_{\left(2,2\right)}+{b}_{\left(2,2\right)}$; you addÂ ,${a}_{\left(3,2\right)}+{b}_{\left(3,2\right)}$ 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:

Take each entry and its position: ${c}_{\left(1,1\right)}$ is a 4, ${d}_{\left(1,1\right)}$ 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?

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.

For ${e}_{\left(1,1\right)}$ the values areÂ $-5+4=-1$, so the solution matrix has -1 at entry positionÂ $e+{f}_{\left(1,1\right)}$. Can you plug in the other four values?

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

## Square matrix multiplication

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:

To get the solution matrix for the first entry, ${i}_{\left(1,1\right)}$, we multiply entries from the first and second matrices' 1,1 positions, (10 x 6), then we multiply ${g}_{\left(1,2\right)}$ times ${h}_{\left(2,1\right)}$, (5 x 3). Add these two products together:

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

Can you figure out the other two on your own? Did you get:

The order of matrices matters in multiplication; multiplying matrixÂ GÂ Ã—Â HÂ gives you a different answer thanÂ HÂ Ã—Â G!

Get free estimates from math tutors near you.

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

## Lesson summary

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.