🌟 Level 2 - Topic 11: Basic Matrices (Part 1) 🔢⬜

1) Introduction to Matrices ⬜

Welcome to the world of Matrices! In this topic, we'll start our journey into matrices, which are fundamental tools in various fields like computer graphics, physics, engineering, and more. Matrices might seem abstract at first, but they are simply organized arrays of numbers, and they are incredibly powerful for representing and manipulating data. In Part 1, we will cover the basics: what matrices are, how to describe them, different types of matrices, and basic operations.

A Matrix is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns.

Think of a matrix as a table of numbers. Each number in a matrix is called an entry or element.

1.1 Matrix Notation and Dimensions

Matrices are usually denoted by uppercase letters, such as \(A\), \(B\), \(M\), etc. To describe a matrix, we specify its dimensions: the number of rows and the number of columns.

The dimensions of a matrix are given as \(m \times n\), where \(m\) is the number of rows and \(n\) is the number of columns. A matrix with \(m\) rows and \(n\) columns is said to be an "m by n" matrix.

Example 1: Matrix Dimensions

Consider the matrix \(A\):

\( A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} \)

Matrix \(A\) has 2 rows and 3 columns. So, the dimensions of matrix \(A\) are \(2 \times 3\). We say \(A\) is a "2 by 3" matrix.

Example 2: Matrix Elements

In matrix \(A\) above:

\( A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} \)

Each element is identified by its position (row and column). We use subscripts to denote the position. For example:

  • \(a_{11} = 1\) (element in the 1st row, 1st column)
  • \(a_{12} = 2\) (element in the 1st row, 2nd column)
  • \(a_{23} = 6\) (element in the 2nd row, 3rd column)
  • In general, \(a_{ij}\) refers to the element in the \(i\)-th row and \(j\)-th column.


2) Types of Matrices 🔢

There are several special types of matrices that are important to recognize. Let's look at a few basic types:

2.1 Square Matrix

A Square Matrix is a matrix with an equal number of rows and columns, i.e., its dimension is \(n \times n\).

In a square matrix, the number of rows is the same as the number of columns.

Example 3: Square Matrices

\( B = \begin{bmatrix} 2 & 5 \\ 8 & -1 \end{bmatrix} \) (A \(2 \times 2\) square matrix)

\( C = \begin{bmatrix} 7 & 0 & 3 \\ 1 & 4 & -2 \\ 9 & 6 & 5 \end{bmatrix} \) (A \(3 \times 3\) square matrix)

2.2 Row Matrix (Row Vector)

A Row Matrix (or Row Vector) is a matrix with only one row, i.e., its dimension is \(1 \times n\).

It's essentially a single horizontal row of numbers.

Example 4: Row Matrix

\( D = \begin{bmatrix} 9 & -3 & 7 & 2 \end{bmatrix} \) (A \(1 \times 4\) row matrix)

2.3 Column Matrix (Column Vector)

A Column Matrix (or Column Vector) is a matrix with only one column, i.e., its dimension is \(m \times 1\).

It's a single vertical column of numbers.

Example 5: Column Matrix

\( E = \begin{bmatrix} 4 \\ 0 \\ -6 \end{bmatrix} \) (A \(3 \times 1\) column matrix)

2.4 Zero Matrix (Null Matrix)

A Zero Matrix (or Null Matrix) is a matrix where all elements are zero. It can be of any dimension.

It's like the "zero" in matrix algebra.

Example 6: Zero Matrices

\( O_{2\times 2} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} \), \( O_{1\times 3} = \begin{bmatrix} 0 & 0 & 0 \end{bmatrix} \)

We often use \(O\) to denote a zero matrix, with subscripts to indicate dimensions if needed.

2.5 Identity Matrix

An Identity Matrix, usually denoted by \(I\) or \(I_n\) (where \(n\) is the size), is a square matrix with 1s on the main diagonal (from the top-left to bottom-right) and 0s everywhere else.

Identity matrices are crucial in matrix algebra, playing a role similar to "1" in multiplication of numbers.

Example 7: Identity Matrices

\( I_2 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \) (The \(2 \times 2\) identity matrix)

\( I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \) (The \(3 \times 3\) identity matrix)


3) Matrix Addition and Subtraction ➕➖

3.1 Adding Matrices

Matrix addition is straightforward. To add two matrices, they must have the same dimensions. You simply add the corresponding elements in each matrix.

To add two matrices \(A\) and \(B\) of the same dimensions \(m \times n\), you add the corresponding elements: \((A + B)_{ij} = a_{ij} + b_{ij}\) for all \(i\) and \(j\).

Example 8: Matrix Addition

Let \( A = \begin{bmatrix} 2 & 3 \\ -1 & 4 \end{bmatrix} \) and \( B = \begin{bmatrix} 0 & -2 \\ 5 & 1 \end{bmatrix} \). Both \(A\) and \(B\) are \(2 \times 2\) matrices, so we can add them.

\( A + B = \begin{bmatrix} 2 & 3 \\ -1 & 4 \end{bmatrix} + \begin{bmatrix} 0 & -2 \\ 5 & 1 \end{bmatrix} = \begin{bmatrix} 2+0 & 3+(-2) \\ -1+5 & 4+1 \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 4 & 5 \end{bmatrix} \)

So, \( A + B = \begin{bmatrix} 2 & 1 \\ 4 & 5 \end{bmatrix} \).

Important Note: Matrix addition is only defined for matrices of the same dimensions. You cannot add a \(2 \times 3\) matrix to a \(2 \times 2\) matrix, for example.

3.2 Subtracting Matrices

Matrix subtraction is also similar to addition. Like addition, to subtract one matrix from another, they must have the same dimensions. You subtract the corresponding elements.

To subtract matrix \(B\) from matrix \(A\), both of dimension \(m \times n\), you subtract the corresponding elements: \((A - B)_{ij} = a_{ij} - b_{ij}\) for all \(i\) and \(j\).

Example 9: Matrix Subtraction

Using the same matrices \( A = \begin{bmatrix} 2 & 3 \\ -1 & 4 \end{bmatrix} \) and \( B = \begin{bmatrix} 0 & -2 \\ 5 & 1 \end{bmatrix} \).

\( A - B = \begin{bmatrix} 2 & 3 \\ -1 & 4 \end{bmatrix} - \begin{bmatrix} 0 & -2 \\ 5 & 1 \end{bmatrix} = \begin{bmatrix} 2-0 & 3-(-2) \\ -1-5 & 4-1 \end{bmatrix} = \begin{bmatrix} 2 & 5 \\ -6 & 3 \end{bmatrix} \)

So, \( A - B = \begin{bmatrix} 2 & 5 \\ -6 & 3 \end{bmatrix} \).


4) Scalar Multiplication 🔢

Scalar multiplication is an operation that multiplies a matrix by a scalar (a single number). To perform scalar multiplication, you multiply each element in the matrix by the scalar.

To multiply a matrix \(A\) by a scalar \(k\), you multiply every element of \(A\) by \(k\): \( (kA)_{ij} = k \cdot a_{ij} \) for all \(i\) and \(j\).

Example 10: Scalar Multiplication

Let \( C = \begin{bmatrix} 6 & 0 \\ -4 & 2 \\ 1 & 3 \end{bmatrix} \) and let \(k = \frac{1}{2}\). We want to calculate \( \frac{1}{2}C \).

\( \frac{1}{2} C = \frac{1}{2} \times \begin{bmatrix} 6 & 0 \\ -4 & 2 \\ 1 & 3 \end{bmatrix} = \begin{bmatrix} \frac{1}{2} \times 6 & \frac{1}{2} \times 0 \\ \frac{1}{2} \times (-4) & \frac{1}{2} \times 2 \\ \frac{1}{2} \times 1 & \frac{1}{2} \times 3 \end{bmatrix} = \begin{bmatrix} 3 & 0 \\ -2 & 1 \\ \frac{1}{2} & \frac{3}{2} \end{bmatrix} \)

So, \( \frac{1}{2} C = \begin{bmatrix} 3 & 0 \\ -2 & 1 \\ \frac{1}{2} & \frac{3}{2} \end{bmatrix} \).

Example 11: Combining Scalar Multiplication and Addition

Using matrices \( A = \begin{bmatrix} 2 & 3 \\ -1 & 4 \end{bmatrix} \) and \( B = \begin{bmatrix} 0 & -2 \\ 5 & 1 \end{bmatrix} \), calculate \(2A - 3B\).

Step 1: Calculate \(2A\).

\( 2A = 2 \times \begin{bmatrix} 2 & 3 \\ -1 & 4 \end{bmatrix} = \begin{bmatrix} 4 & 6 \\ -2 & 8 \end{bmatrix} \)

Step 2: Calculate \(3B\).

\( 3B = 3 \times \begin{bmatrix} 0 & -2 \\ 5 & 1 \end{bmatrix} = \begin{bmatrix} 0 & -6 \\ 15 & 3 \end{bmatrix} \)

Step 3: Calculate \(2A - 3B = 2A + (-3B)\).

\( 2A - 3B = \begin{bmatrix} 4 & 6 \\ -2 & 8 \end{bmatrix} - \begin{bmatrix} 0 & -6 \\ 15 & 3 \end{bmatrix} = \begin{bmatrix} 4-0 & 6-(-6) \\ -2-15 & 8-3 \end{bmatrix} = \begin{bmatrix} 4 & 12 \\ -17 & 5 \end{bmatrix} \)

So, \( 2A - 3B = \begin{bmatrix} 4 & 12 \\ -17 & 5 \end{bmatrix} \).


5) Practice Questions 🎯

5.1 Fundamental – Build Skills

1. What are the dimensions of matrix \(X = \begin{bmatrix} 2 & -1 & 5 \\ 0 & 3 & -2 \end{bmatrix}\)?

2. Identify the element \(x_{21}\) in matrix \(X\) from question 1.

3. Is matrix \(Y = \begin{bmatrix} 4 & 1 \\ 1 & 4 \end{bmatrix}\) a square matrix? Why or why not?

4. Is matrix \(Z = \begin{bmatrix} 7 & -2 & 3 \end{bmatrix}\) a row matrix or a column matrix?

5. Write down a \(3 \times 3\) zero matrix.

6. Write down a \(2 \times 2\) identity matrix.

7. Given \(A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\) and \(B = \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix}\), calculate \(A + B\).

8. Given \(A\) and \(B\) from question 7, calculate \(A - B\).

9. Given \(C = \begin{bmatrix} -1 & 0 \\ 2 & -3 \end{bmatrix}\), calculate \(2C\).

10. Given \(D = \begin{bmatrix} 4 \\ -2 \\ 1 \end{bmatrix}\) and scalar \(k = 3\), calculate \(kD\).

11. Can you add matrix \(P = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\) and \(Q = \begin{bmatrix} 2 & 3 & 4 \end{bmatrix}\)? Explain.

12. Given \(E = \begin{bmatrix} 2 & -1 \\ 0 & 5 \end{bmatrix}\) and \(F = \begin{bmatrix} 3 & 2 \\ -2 & 1 \end{bmatrix}\), calculate \(2E + F\).

13. Using \(E\) and \(F\) from question 12, calculate \(E - \frac{1}{2}F\).

5.2 Challenging – Push Limits 💪🚀

1. If \(A + B = \begin{bmatrix} 5 & -1 \\ 2 & 6 \end{bmatrix}\) and \(A = \begin{bmatrix} 2 & 3 \\ 0 & 1 \end{bmatrix}\), find matrix \(B\).

2. Solve for \(x\) and \(y\): \( 2 \begin{bmatrix} x & 1 \\ 0 & y \end{bmatrix} = \begin{bmatrix} 4 & 2 \\ 0 & -6 \end{bmatrix}\).

3. Let \(U = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\), \(V = \begin{bmatrix} 0 & -1 \\ -2 & 0 \end{bmatrix}\), and \(W = \begin{bmatrix} -3 & 0 \\ 0 & -3 \end{bmatrix}\). Calculate \(U - V + 2W\).

4. (Conceptual) Explain why matrix addition and subtraction require matrices to have the same dimensions. What would go wrong if you tried to add matrices of different sizes?

5. (Application) A store has two branches. In Branch 1, they sold 50 laptops and 75 tablets. In Branch 2, they sold 60 laptops and 80 tablets. Represent this data using a \(2 \times 2\) matrix where rows represent branches and columns represent product types. Then, if sales in both branches increase by 10% next month, use scalar multiplication to calculate the projected sales.


6) Summary 🎉

  • A Matrix is a rectangular array of numbers arranged in rows and columns. Dimensions are given as \(m \times n\) (rows × columns).
  • Types of Matrices:
    • Square Matrix: Number of rows equals number of columns.
    • Row Matrix: One row only.
    • Column Matrix: One column only.
    • Zero Matrix: All elements are zero.
    • Identity Matrix: Square matrix with 1s on the main diagonal and 0s elsewhere.
  • Matrix Addition and Subtraction: Performed element-wise, only possible for matrices of the same dimensions.
  • Scalar Multiplication: Multiply each element of a matrix by a scalar (number).

Congratulations! You've now taken your first steps into the world of matrices, learning about their basic structure, types, and fundamental operations like addition, subtraction, and scalar multiplication. In Part 2, we will explore more advanced matrix operations, including the important topic of matrix multiplication. Keep practicing these basics, and you'll be well-prepared for more complex matrix concepts! 🌟

← Back to Previous Topic (Part 2 - Probability & Combinatorics) Continue to Topic 12 (Basic Matrices Part 2) → View Level 2 Topics Overview →