Showing posts with label ML. Show all posts
Showing posts with label ML. Show all posts

Sunday, 7 July 2024

Learning - Linear Algebra

Asked with the Gemini and Chat GPT - asked queries and noted here. :)


Linear Algebra 

- is the branch of mathematics that deals with the vector spaces and the linear transformations.  

- what is vector space? A vector space is a collection of vectors where specific operations like addition and scalar multiplication (multiplying a vector by a number) can be performed.


- what is a vector? Vectors represent quantities that have both size and direction. An example can be force which requires the strength and the direction.

  • Vectors can be added together and multiplied by scalars.
  • Vector addition: a+b=(a1a2)+(b1b2)=(a1+b1a2+b2)\mathbf{a} + \mathbf{b} = \begin{pmatrix} a_1 \\ a_2 \end{pmatrix} + \begin{pmatrix} b_1 \\ b_2 \end{pmatrix} = \begin{pmatrix} a_1 + b_1 \\ a_2 + b_2 \end{pmatrix}
  • Scalar multiplication: cv=c(v1v2)=(cv1cv2)c \mathbf{v} = c \begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} c v_1 \\ c v_2 \end{pmatrix}
  • Represented graphically by arrows in space, with the direction and length corresponding to the vector's direction and magnitude.

  • - what are linear transformations? Functions that take one vector space and maps it to another, preserving the linear relationships between vectors. It is a transformation that stretches, shrinks, or rotates vectors Matrices represents linear transformations.


    - what are matrices? Matrices are rectangular arrays of numbers that represents linear transformations, solve systems of linear equations, and store data. They are grids like structure where operations on rows and columns to manipulate vectors can be performed. 

    A matrix with mm rows and nn columns is called an m×nm \times n matrix (read as "m by n matrix"). It is typically written in the form:

    A=(a11a12a1na21a22a2nam1am2amn)A = \begin{pmatrix} 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{pmatrix}

    where aija_{ij} represents the element in the ii-th row and jj-th column of the matrix.


    Operations involving Vectors and Scalars

    • Dot Product: The dot product (or scalar product) of two vectors a\mathbf{a} and b\mathbf{b} is a scalar defined as: ab=a1b1+a2b2++anbn\mathbf{a} \cdot \mathbf{b} = a_1 b_1 + a_2 b_2 + \ldots + a_n b_n
    • Cross Product: The cross product of two vectors in R3\mathbb{R}^3 results in another vector perpendicular to both: a×b=ijka1a2a3b1b2b3\mathbf{a} \times \mathbf{b} = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ \end{vmatrix}
    • Norm (Magnitude): The norm (or length) of a vector v\mathbf{v} is given by: v=v12+v22++vn2\|\mathbf{v}\| = \sqrt{v_1^2 + v_2^2 + \ldots + v_n^2}

    SDGs in Nepal

    Achieving the Sustainable Development Goals (SDGs) in Nepal by the 2030 deadline is a major national aspiration but also a complex challeng...