Week 3 - BALT 4396 - Introduction to Linear Algebra for Data Science

Linear Algebra in Data Science


There are many ways to use linear algebra, it serves as the underlying structure in manipulating and analyzing data in large and small models. Instead of blindly looking at data and interpreting it as you please, linear algebra allows data scientists to analyze systematically. This way of analyzing provides a structured and efficient way of going about things, especially when used in conjunction with vectors and matrices.

What is Data Science? Concepts and Guide | decube

Vectors are an ordered list of numbers that represent quantities containing both magnitude and direction. For example, we can depict this with a pizza, its size of 14 inches with 3 toppings: pizza = [14, 3].
Vectors can also store data:
pizza = [12, 1]
pizza = [16, 3]
pizza = [14, 2]
Storing data of this sort can be extremely useful in comparing values as each pizza will be represented as a vector and can perform operations in analyzing the data itself. From this, basic mathematical operations can be performed and executed based on the data set.

Python with Vectors

The vector operations can be used within Python by using lists or the NumPy library as it will be more efficient because of its use in manipulating arrays and its built-in common operation functions. The most useful factor in all this is that Python data sets can be any size, big or small. Whether there are 100 pizzas to sift through or only 5, Python can handle it all as opposed to spreadsheets which limit how much data it can reliably work with.

Matrices and Linear Transformations

A matrix is a two-dimensional array of numbers, where each number is called an element. Oftentimes, they are thought of as a table with rows and columns, and most are familiar with its layout as one you would see in an Excel spreadsheet. Combined with linear transformation functions, mapping vectors and matrices to other existing vectors and matrices preserves the operations of both and can help in machine learning algorithms as it allows for much easier manipulation.

Comments