Matrices in Math: Definitions, Types, and Operations
Read matrix dimensions and entries, identify common types, and work through examples of addition, multiplication, transpose, and systems.
TL;DR
A matrix is a rectangular array arranged in rows and columns. Its dimensions are rows by columns. Different operations have different size rules. Matrix multiplication pairs each selected row with a selected column.
Key Points
- A matrix with rows and columns has dimensions .
- The entry is in row and column .
- Add or subtract matrices only when both dimensions match.
- Multiply when the left column count matches the right row count.
- Special matrices such as the identity and zero matrix have distinct roles.
What is a matrix in mathematics?
A matrix stores entries in a rectangular table. An entry can represent a measurement, a system coefficient, or a component of a transformation. The horizontal positions form rows. The vertical positions form columns.
Write to refer to row and column of matrix . The first subscript always names the row. It helps to read dimensions in the same order: rows, then columns. For instance, a matrix with three rows and two columns is and has six entries. OpenStax, Matrices and Matrix Operations
Which types of matrices should you recognise?
| Type | What to look for |
|---|---|
| Row matrix | Exactly one row |
| Column matrix | Exactly one column |
| Square matrix | The number of rows equals the number of columns |
| Zero matrix | Every entry is zero |
| Diagonal matrix | It is square and all off-diagonal entries are zero |
| Identity matrix | A diagonal matrix with every diagonal entry equal to 1 |
| Upper triangular matrix | All entries below the main diagonal are zero |
| Symmetric matrix | It is square and equals its transpose |
A transpose switches rows and columns. It sends the entry in position to and turns a matrix into a one. A square matrix may meet several definitions at once. For instance, the identity is diagonal, symmetric, and triangular. OpenStax, Precalculus: Matrices and Matrix Operations
How do matrix addition, scaling, and multiplication differ?
Add or subtract two matrices of the same dimensions by combining entries in matching positions. To multiply a matrix by a scalar, multiply every entry by that scalar.
In matrix multiplication, take a row of the left matrix and a column of the right matrix. Multiply entries from matching positions within that pair, then add. A product of an matrix and an matrix has dimensions . The shared counts the terms in each dot product. Reversing the factors can produce a different answer or make the product undefined. The 3 × 3 product guide walks through a full calculation. Georgia Tech, Interactive Linear Algebra: Matrix Multiplication
What rules carry over from ordinary arithmetic?
Matrix addition is commutative and associative when the matrices have equal shapes. The zero matrix with matching dimensions is the additive identity. The additive inverse of is , made by changing every entry’s sign. Multiplication by an ordinary number distributes over matrix addition. The products and also agree when the sizes allow them, because each output entry adds corresponding scalar terms. Matrix multiplication itself is associative for compatible sizes and usually depends on order. OpenStax, Operations and Their Properties
For example, let have rows and have rows . To compute , double each entry of and subtract the matching entry of . The two rows of the result are and . The sign of the second entry of matters because .
The transpose also has a useful order rule. because the row of one product becomes the column of its transpose. If is and is , both sides have shape . Checking dimensions can catch a reversed formula before you calculate its entries.
How do matrices represent systems of equations?
Place the coefficients of each equation in a different row. Keep the variables in a fixed column order. For instance, in a system with unknowns and , column 1 holds the coefficients. Column 2 holds the coefficients. The numbers on the right of the equations form a separate column.
Writing condenses those equations. If is square and has an inverse, the system has the unique solution . A zero determinant means that method cannot be used. A rectangular matrix can still represent a valid system and can be row-reduced. The inverse matrix guide explains when the inverse exists. OpenStax, Solving Systems With Inverses
Worked Matrix Examples
Example 1
Find the dimensions and entry of
- There are three rows and two columns.
- The dimensions are .
- Row 3 starts with 5, so .
Example 2
Add the matrices with rows and .
- Both have dimensions .
- Adding their first rows gives .
- Adding their second rows gives . The entire result contains four entries equal to 3.
Example 3
Multiply the matrices
- The inner sizes are both 3, so the result has shape .
- Row 1 of dotted with column 1 of gives .
- The full result has first row and second row .
Example 4
Transpose a matrix with first row and second row .
- The first column becomes as a row.
- The second becomes , and the third becomes .
- The result has three rows and two columns.
Example 5
Apply the diagonal matrix with diagonal entries 2 and 3 to the column vector with entries 4 and .
- The first row multiplies 4 by 2 and contributes zero from the other coordinate.
- The second row multiplies by 3.
- The resulting vector has entries 8 and . Each diagonal entry scales the matching coordinate.
Example 6
Represent and by a matrix equation and find the solution.
- The coefficient matrix has rows and .
- The right-hand column contains 7 and 8. Adding the equations eliminates .
- Then , so and . Both original equations check.
Mistakes That Change a Matrix Answer
Mistake 1: Reading the first dimension as columns
A matrix has two rows and three columns. Position means the final entry in its second row.
Mistake 2: Adding matrices with the same number of entries but different shapes
A matrix and a matrix each have six entries. Their positions do not match for addition.
Mistake 3: Using entrywise multiplication for an ordinary matrix product
The standard product combines rows with columns. Only use entrywise multiplication when the question specifies it.
Try It Yourself
- How many entries does a matrix have?
- What shape is the product of a matrix and a matrix?
- Is the square matrix with rows and symmetric?
Answers and Reasoning
- Eight entries.
- The shared size 2 matches, producing a matrix.
- Yes. The off-diagonal positions both contain 5, so taking the transpose leaves it unchanged.
Frequently Asked Questions
What does the identity matrix do?
Multiplying a compatible matrix by the identity leaves its entries unchanged. The identity’s diagonal ones select matching rows or columns.
Can two non-square matrices multiply?
Yes. Only the inner dimensions need to match. The product can be square or rectangular.
Does every matrix have a determinant?
A determinant is defined for square matrices. The 3 × 3 determinant guide explains the calculation for that size.
Conclusion
- Read dimensions and subscripts in row-then-column order.
- Check the shape rule for the requested operation.
- Use a small row, column, or entry calculation to verify the result.
Read More
Research Behind This Article
- OpenStax, Algebra and Trigonometry 2e: Matrices and Matrix Operations. OpenStax
- OpenStax, Precalculus 2e: Matrices and Matrix Operations. OpenStax
- Dan Margalit and Joseph Rabinoff, Interactive Linear Algebra: Matrix Multiplication. Georgia Tech
- OpenStax, Algebra and Trigonometry 2e: Solving Systems With Inverses. OpenStax