Sec-2 AI Applications Math Review PDF

Document Details

FluentLimerick

Uploaded by FluentLimerick

Faculty of Computer Science and Information Technology

Khufu

Tags

linear algebra vectors matrices mathematics

Summary

This document provides notes on vectors, matrices, and linear algebra. It explains concepts such as vector addition, scalar multiplication, dot products, and matrix multiplication, with examples to illustrate the concepts. The notes appear to be from a secondary school level.

Full Transcript

# Sec-2-AI applications Math_Review ## Vectors, Matrices and Linear Algebra A vector is a member of vector space A Vector is an ordered sequence of values For example: In two-dimensional space, we have vectors such as: * X = (3, 4) and Y = (0, 2) The two fundamental operations on Vectors are:...

# Sec-2-AI applications Math_Review ## Vectors, Matrices and Linear Algebra A vector is a member of vector space A Vector is an ordered sequence of values For example: In two-dimensional space, we have vectors such as: * X = (3, 4) and Y = (0, 2) The two fundamental operations on Vectors are: vector addition and Scalar multiplication. ### Examples * X + Y = (3 + 0, 4 + 2) = (3, 6) * Scalar multiplication, multiplies each element by a constant * 5 X = 5 (3, 4) = (15, 20) The length of a vector is: |X| = √3² + 4² = √25 = 5 ## The dot product also called (Scalar Product) X.Y = Σ x<sub><sup>i</sup></sub> y<sub><sup>i</sup></sub> X.Y = 3x0 + 4x2 = 8 ## A matrix: Is a rectangular array of values arranged into rows and columns ## Example: matrix M of size 3x4 * M<sub><sub>11</sub></sub> M<sub><sub>12</sub></sub> M<sub><sub>13</sub></sub> M<sub><sub>14</sub></sub> * M<sub><sub>21</sub></sub> M<sub><sub>22</sub></sub> M<sub><sub>23</sub></sub> M<sub><sub>24</sub></sub> * M<sub><sub>31</sub></sub> M<sub><sub>32</sub></sub> M<sub><sub>33</sub></sub> M<sub><sub>34</sub></sub> The first index of M<sub><sub>ij</sub></sub> specifies the row and the second specifies the column. In programming languages m<sub><sub>ij</sub></sub> is often written as m[i, j] or m[i][j] ## The sum of 2 matrices is defined by adding corresponding elements Thus, (m + n)<sub><sub>ij</sub></sub> = m<sub><sub>ij</sub></sub> + n<sub><sub>ij</sub></sub> Note that matrices with the same size. If the matrices are with different size, the sum is undefined. ## Multiplication of matrices, by scalar: (Cm)<sub><sub>ij</sub></sub> = Cm<sub><sub>ij</sub></sub> ## Examples * 5 * (2 4) = (10 5) * (3 4) = (15 20) * M<sub><sub>3,2</sub></sub> = (1 2 3) * N<sub><sub>3,2</sub></sub> = (0 1 5 2) * (4 5 6) * (1 2 1) * M + N = (1 7 5) * (5 8 7) * (4 1 3) ## Matrix Multiplication The product mn is defined only if M is size a x b and n is of size b x c. m a x b . n b x c -> is defined mn ≠ nm ## Example: * M<sub><sub>3,3</sub></sub> = (1 3 5) * (2 4 6) * (0 1 2) * (2 5 1) * m n = (1 x 0 + 3 x 2 + 5 x 0 + 1 x 1 + 3 x 1 + 5 x 5 + 2 x 2 + 3 x 5 + 5 x 6) * (2 x 0 + 4 x 2 + 6 x 0 + 2 x 1 + 4 x 1 + 6 x 5 + 2 x 2 + 4 x 5 + 6 x 6) * mn = (13 8 35) * (8 35 44) ## The Identity matrix I has elements I<sub><sub>i</sub></sub><sub><sub>j</sub></sub> equal to 1 when i = j and equal to zero otherwise. It has the property m I = m ## The transpose of matrix: m<sub><sub>ij</sub></sub><sup><sup>T</sup></sup> = m<sub><sub>ji</sub></sub> ## Example: * m<sub><sub>3x2</sub></sub> = (2 1) * (4 7) * (1 5 8) * m<sup><sup>T</sup></sup><sub><sub>2x3</sub></sub> = (2 4 7) * (1 5 8)

Use Quizgecko on...
Browser
Browser