Full Transcript

# Matrices ## Definition A matrix is a rectangular array of numbers, symbols, or expressions arranged in rows and columns. * **Rows**: Horizontal lines in a matrix * **Columns**: Vertical lines in a matrix ## Matrix Size The "size" of a matrix is defined by the number of rows and columns it...

# Matrices ## Definition A matrix is a rectangular array of numbers, symbols, or expressions arranged in rows and columns. * **Rows**: Horizontal lines in a matrix * **Columns**: Vertical lines in a matrix ## Matrix Size The "size" of a matrix is defined by the number of rows and columns it contains: * $m \times n$ matrix: $m$ rows and $n$ columns ## Matrix Elements Matrices often represented by a single capital letter, like $A$, $B$, or $X$. Each element (or entry) is denoted by $a_{ij}$, where: * $i$ is the row number * $j$ is the column number $$A = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix}$$ ### Example $$A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}$$ * Size: $2 \times 3$ * $a_{11} = 1, a_{12} = 2, a_{13} = 3$ * $a_{21} = 4, a_{22} = 5, a_{23} = 6$ ## Types of Matrices 1. **Square Matrix**: Number of rows equals the number of columns ($n \times n$) $$A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$$ 2. **Row Matrix**: Only one row ($1 \times n$) $$A = \begin{bmatrix} 1 & 2 & 3 \end{bmatrix}$$ 3. **Column Matrix**: Only one column ($m \times 1$) $$A = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}$$ 4. **Zero Matrix**: All elements are zero $$A = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}$$ 5. **Diagonal Matrix**: Non-diagonal elements are zero $$A = \begin{bmatrix} 1 & 0 \\ 0 & 2 \end{bmatrix}$$ 6. **Identity Matrix**: Diagonal elements are 1, non-diagonal elements are 0 $$I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$$ ## Matrix Operations ### 1. Addition Matrices $A$ and $B$ can be added if they have the same dimensions ($m \times n$). If $A = [a_{ij}]$ and $B = [b_{ij}]$, then $A + B = [a_{ij} + b_{ij}]$. #### Example $$A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, B = \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix}$$ $$A + B = \begin{bmatrix} 1+5 & 2+6 \\ 3+7 & 4+8 \end{bmatrix} = \begin{bmatrix} 6 & 8 \\ 10 & 12 \end{bmatrix}$$ ### 2. Subtraction Matrices $A$ and $B$ can be subtracted if they have the same dimensions ($m \times n$). If $A = [a_{ij}]$ and $B = [b_{ij}]$, then $A - B = [a_{ij} - b_{ij}]$. #### Example $$A = \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix}, B = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$$ $$A - B = \begin{bmatrix} 5-1 & 6-2 \\ 7-3 & 8-4 \end{bmatrix} = \begin{bmatrix} 4 & 4 \\ 4 & 4 \end{bmatrix}$$ ### 3. Scalar Multiplication If $A$ is a matrix and $c$ is a scalar, then $cA$ is obtained by multiplying each element of $A$ by $c$. If $A = [a_{ij}]$, then $cA = [ca_{ij}]$. #### Example $$A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, c = 2$$ $$2A = \begin{bmatrix} 2\times1 & 2\times2 \\ 2\times3 & 2\times4 \end{bmatrix} = \begin{bmatrix} 2 & 4 \\ 6 & 8 \end{bmatrix}$$ ### 4. Matrix Multiplication For two matrices $A$ and $B$, the product $AB$ is defined if the number of columns of $A$ is equal to the number of rows of $B$. If $A$ is an $m \times n$ matrix and $B$ is an $n \times p$ matrix, then $AB$ is an $m \times p$ matrix. If $A = [a_{ij}]$ and $B = [b_{jk}]$, then the element $c_{ik}$ of $AB$ is given by: $$c_{ik} = \sum_{j=1}^{n} a_{ij}b_{jk} = a_{i1}b_{1k} + a_{i2}b_{2k} + \cdots + a_{in}b_{nk}$$ #### Example $$A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, B = \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix}$$ $$AB = \begin{bmatrix} (1\times5 + 2\times7) & (1\times6 + 2\times8) \\ (3\times5 + 4\times7) & (3\times6 + 4\times8) \end{bmatrix} = \begin{bmatrix} 19 & 22 \\ 43 & 50 \end{bmatrix}$$

Use Quizgecko on...
Browser
Browser