Linear Algebra To Know For Machine Learning

In this article, we’ll learn about Linear Algebra. Linear Algebra is the backbone of Artificial Intelligence. Complex models in Machine Learning are represented and solved with the processes of Linear Algebra and thus it is critical. Each and every Machine Learning Engineer must have a strong foundation of it.

Read the Previous Article — Why Do AI Engineers Need Calculus to dive deeper into Calculus in order to become a better AI Engineer

Linear Algebra

What we’ll be learning in this article is overall about what happens when we have multiple variables,

  • Introduction to vectors
  • Solving sets of linear equations
  • Introduction to matrices
  • Solving sets of linear equations of matrices
  • Linear transformations
  • Identity matrix
  • Determinant

Vectors

Vector Addition

Vectors can be added and subtracted.

Graphically, we can imagine adding two different vectors together as placing two-line segments end-to-end, maintaining distance and direction. An example of it is illustrated below, showing the addition of two vectors that create the third vector. A vector is denoted by its name with an arrow over it.

Let,

,

Adding the vectors, we get,

This resultant vector would be the third vector.

Vector Multiplication

There are two different distinguishable ways of multiplying vectors, which are called dot products (i.e. scalar products) and cross products. The dot product generates a scalar value from the product of two vectors and will be discussed in greater detail below. Do not confuse the dot product with the cross product which is entirely different.

Here,

And the calculations are the same in multiple dimensions.

Solving a set of equations,

One of the ways to solve the two equations is to draw them graphically and how they intersect each other.

In Linear Algebra, we take the matrixes and solve them.

Let us take, two equations,

X = Y + 5

3X + 2Y = 5

Taking both X and Y is same sides, we get,

X — Y = 5

3X + 2 Y = 5

Taking the above equation, I and II in matrix form, we get,

Matrix

Matrix Row & Matrix Column

Entries or Elements are different numbers, symbols, and expressions in a matrix. Rows and Columns are the horizontal and vertical lines in a matrix respectively.

Matrix Multiplication

Matrix multiplication is complicated, as multiple elements in the first matrix interact with multiple elements in the second to produce each element in the product matrix. This explains how matrix multiplication can be a mundane task to carry out by hand, and thus would be time-consuming on a computer for very large matrices.

Taking matrix multiplication for two different equations,

X — Y = 5

3X + 2 Y = 5 can be written as,

Here, the vertical values 1, 3 and –1,2 are columns and the horizontals are taken as rows.

To Read the full article with detailed examples, https://www.c-sharpcorner.com/article/linear-algebra-to-know-for-machine-learning/

Man on a Mission - to create epochal impact

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store