uni

Thing1's amazing uni repo
Log | Files | Refs | Submodules

23.02.26.md (1353B)


      1 # 23/02/26
      2 
      3 ## matrices and arrays
      4 
      5 - a group of rows and columns, the number of rows is m, and columns is n
      6     - the size of the matrix is written as (m x n), (rows, columns)
      7 
      8 - a single row matrix is called a row vector 
      9 - a single column matrix is called a column vector 
     10 - matrix index from 1
     11 - a matrix that looks like this, is the identity matrix
     12 ```
     13 (1 0 0)
     14 (0 1 0)
     15 (0 0 1)
     16 ```
     17 this can be any size, just needs to follow this shape (line from top left to bottom right
     18 
     19 - you can only add matrices when they are the same size
     20     - just add the elements from the same position into the new one
     21     ```
     22 (a+b c+d ....)
     23 (............)
     24     ```
     25 - subtraction is the same as addition
     26 
     27 - you can multiply matrices by numbers or other matrices
     28 - we use the `.` to multiply not `x` or `*`
     29 
     30 - when multiplying by a number, just multiply each element by the number
     31 
     32 - when multiplying by another matrix
     33     - the number of columns must be the same as the number of rows in the second matrix
     34     - `{(n _ 1 == m _ 2)}`
     35     - its not commutative operation (a * b != b * a)
     36     - a 3 x 5 matrix can be multiplied by a 5 x 10 (the second number of the first matrix, needs to be the same as the first number of the second matrix)
     37     - you multiply rows, by columns, the value at (2, 4) is the sum of the products from row 2 in matrix 1 and column 4 in matrix 2