Full Transcript

# Matrices, Geometry & Mathematica ## Part 1: Vectors and Matrices ### 1.1 What is a Matrix? A matrix is a rectangular array of elements. * These elements can be real numbers, complex numbers, or even functions. * We will deal primarily with matrices containing real numbers. ### 1.2 Notatio...

# Matrices, Geometry & Mathematica ## Part 1: Vectors and Matrices ### 1.1 What is a Matrix? A matrix is a rectangular array of elements. * These elements can be real numbers, complex numbers, or even functions. * We will deal primarily with matrices containing real numbers. ### 1.2 Notation Matrices are denoted by bold uppercase letters, such as **A**. **A** = $\begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}$ * The element in the $i$-th row and $j$-th column is denoted $a_{ij}$. * A matrix with $m$ rows and $n$ columns is an $m \times n$ matrix. ### 1.3 Vectors A vector is a matrix with only one row or one column. * A column vector is an $n \times 1$ matrix: $\mathbf{v} = \begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ v_n \end{bmatrix}$ * A row vector is a $1 \times n$ matrix: $\mathbf{v} = \begin{bmatrix} v_1 & v_2 & \cdots & v_n \end{bmatrix}$ ### 1.4 Transpose The transpose of a matrix **A**, denoted $\mathbf{A}^T$, is obtained by interchanging rows and columns. If $\mathbf{A} = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}$, then $\mathbf{A}^T = \begin{bmatrix} a_{11} & a_{21} \\ a_{12} & a_{22} \end{bmatrix}$ ### 1.5 Matrix Equality Two matrices **A** and **B** are equal if and only if: 1. They have the same dimensions. 2. All corresponding elements are equal, i.e., $a_{ij} = b_{ij}$ for all $i$ and $j$. ### 1.6 Matrix Addition and Subtraction If **A** and **B** are both $m \times n$ matrices, then their sum **A** + **B** is also an $m \times n$ matrix, obtained by adding corresponding elements: $(\mathbf{A} + \mathbf{B})_{ij} = a_{ij} + b_{ij}$ Similarly, their difference **A** - **B** is obtained by subtracting corresponding elements: $(\mathbf{A} - \mathbf{B})_{ij} = a_{ij} - b_{ij}$ ### 1.7 Scalar Multiplication If **A** is a matrix and $c$ is a scalar, then the scalar multiple $c\mathbf{A}$ is obtained by multiplying each element of **A** by $c$: $(c\mathbf{A})_{ij} = ca_{ij}$ ### 1.8 Matrix Multiplication If **A** is an $m \times n$ matrix and **B** is an $n \times p$ matrix, then their product **AB** is an $m \times p$ matrix, where: $(\mathbf{AB})_{ij} = \sum_{k=1}^{n} a_{ik}b_{kj}$ * The number of columns in **A** must equal the number of rows in **B**. * Matrix multiplication is not commutative in general: $\mathbf{AB} \neq \mathbf{BA}$. ### 1.9 Identity Matrix The identity matrix **I** is a square matrix with 1s on the main diagonal and 0s elsewhere. $\mathbf{I} = \begin{bmatrix} 1 & 0 & \cdots & 0 \\ 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & 1 \end{bmatrix}$ For any matrix **A**, $\mathbf{AI} = \mathbf{A}$ and $\mathbf{IA} = \mathbf{A}$. ### 1.10 Inverse of a Matrix If **A** is a square matrix, then its inverse, denoted $\mathbf{A}^{-1}$, is a matrix such that: $\mathbf{AA}^{-1} = \mathbf{A}^{-1}\mathbf{A} = \mathbf{I}$ * Not all matrices have an inverse. * A matrix that has an inverse is called invertible or non-singular. ### 1.11 Determinant of a Matrix The determinant of a square matrix **A**, denoted det(**A**) or |**A**|, is a scalar value that can be computed from the elements of the matrix. For a $2 \times 2$ matrix: $\mathbf{A} = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$, det($\mathbf{A}$) = $ad - bc$ For larger matrices, the determinant can be computed using various methods such as cofactor expansion. * A matrix is invertible if and only if its determinant is non-zero. ### 1.12 Mathematica Mathematica is a symbolic computation program used in science, engineering, mathematics and computing. It was conceived by Stephen Wolfram and is developed by Wolfram Research of Champaign, Illinois. ### 1.13 Vectors in Mathematica Vectors are represented as lists. `v = {1, 2, 3}` ### 1.14 Matrices in Mathematica Matrices are represented as lists of lists, where each sublist is a row. `A = {{1, 2}, {3, 4}}` ### 1.15 Basic Matrix Operations * **Addition**: `A + B` * **Subtraction**: `A - B` * **Scalar Multiplication**: `c A` * **Matrix Multiplication**: `A.B` * **Transpose**: `Transpose[A]` * **Inverse**: `Inverse[A]` * **Determinant**: `Det[A]`