Mastering Matrix Row Operations
Matrix Basics
What is a Matrix?
Think of a matrix as a rectangular grid for organizing numbers. It's like a spreadsheet or a bingo card, with information arranged in rows and columns. This simple structure is incredibly powerful in math, computer science, and engineering.
We describe the size, or dimensions, of a matrix by its number of rows and columns, always in that order. A matrix with 2 rows and 3 columns is called a "2 by 3" matrix, written as .
Each number inside the matrix is called an element. We can locate any element using its row and column number. For a matrix named , the element in the -th row and -th column is denoted as or . For example, in the matrix above, the element is in the second row and first column.
Types of Matrices
Matrices come in a few special varieties. Knowing them will help you understand their different roles.
Rectangular and Square Matrices: Any matrix where the number of rows and columns aren't equal is a rectangular matrix. If the number of rows does equal the number of columns, it's a square matrix.
Two other important types are special kinds of square matrices.
Diagonal Matrix
noun
A square matrix where all elements are zero except for those on the main diagonal (from the top left to the bottom right).
Identity Matrix
noun
A diagonal matrix where all the elements on the main diagonal are 1. It is denoted by .
The identity matrix is special because in matrix multiplication, it acts just like the number 1. Multiplying any matrix by an identity matrix of the correct size leaves the original matrix unchanged.
Matrix Operations
We can perform familiar arithmetic operations on matrices, but with a few new rules.
Addition and Subtraction: To add or subtract two matrices, they must have the exact same dimensions. The operation is simple: just add or subtract the corresponding elements.
Here is an example with numbers:
Multiplication is a bit more involved. To multiply matrix by matrix (in that order, as ), the number of columns in must equal the number of rows in . If you multiply a matrix by an matrix, the result will be an matrix.
To find the element in row and column of the resulting matrix, you multiply each element of row from the first matrix by the corresponding element of column from the second matrix, and then add up all the products. This is often called a dot product.
Let's multiply a matrix by a matrix. The result will be a matrix.
Let's find the element in the first row, first column of the product matrix :
And the element in the first row, second column:
By continuing this process for all elements, we get the final result:
A crucial point: Unlike with regular numbers, matrix multiplication is generally not commutative. This means is not the same as . In fact, sometimes may not even be a valid operation!
Now that you have the basic terms and operations down, let's review.
Ready to test your knowledge?
A matrix has 4 rows and 5 columns. What are its dimensions?
Given the matrix , what is the value of the element ?
Understanding these fundamentals is the first step. Next, we'll see how these tools are used to solve more complex problems.