Matrix Basics and Operations
1. Matrices and Matrix Operations: The Basics
Now we formally define the tool we've been using!
Definition of a Matrix
A matrix is a rectangular array of numbers. The numbers inside the matrix are called the entries.
Size of a Matrix
The size of a matrix is always described as:
(Hint: Rows run horizontally , Columns run vertically )
An matrix is a matrix having rows and columns.
2. Matrix Terminology: Square Matrices and the Trace
Square Matrix
A matrix is a square matrix if the number of rows equals the number of columns (e.g., , ).
Zero Matrix
A matrix where every single entry is . Denoted as .
The Main Diagonal
In a square matrix, the main diagonal is the line of entries starting from the top-left corner down to the bottom-right corner. (Entries ).
Remark: A non-square matrix does NOT have a main diagonal.
The Trace of a Matrix ()
Let be a square matrix. The trace of is defined as the sum of all the entries on its main diagonal:
Remark: The trace of a non-square matrix is undefined.
3. Matrix Arithmetic: Addition, Subtraction, and Scalars
Addition () and Subtraction ()
To add or subtract two matrices, you simply add or subtract the corresponding entries in the exact same positions.
Crucial Rule: Matrices must be the exact same size to be added or subtracted.
Scalar Multiplication ()
Let be a scalar (a regular real number). To find , you multiply every single entry inside matrix by the number .
4. Matrix Multiplication ()
Matrix multiplication is highly specific and does not work like normal multiplication.
The Dimension Rule
Let be an matrix and be an matrix. You can only multiply them if the middle two numbers match (the columns of must equal the rows of ).
The result, , will be a new matrix with the outer dimensions: .
How to Multiply ("Row by Column")
To find the entry in the -th row and -th column of your new matrix :
- Single out the -th row from matrix .
- Single out the -th column from matrix .
- Multiply their corresponding entries together one by one, and add the resulting products.
Important Note: Unlike regular numbers where , in matrices, ! Sometimes works, but if you flip them, the dimensions no longer match and is "undefined".