# Linear Algebra Data Structures and Operations

Source: Deep Learning on Medium # Motivation

Linear algebra is incredibly useful for deep learning. If probability and statistics is the theory behind machine learning, then linear algebra is what makes it possible and computationally efficient.

This article assumes you have a pretty good computer science and math background. The article is on the visual side, meaning I tried to illustrate most concepts graphically.

# Data Structures

## Scalars

• Scalars are single numbers, they can be represented by an italic smaller case letter. It doesn’t matter whether they’re integers or doubles, they’re all scalars

## Vectors

• Array of numbers, mathematically speaking they can be thought of as directions from the origin, or points in space.
• The individual elements of the vector are scalars
• Also the space of the vector is denoted by:
• Vectors and Sets, sets are pretty important, so to establish the proper notation for understanding vectors with sets:

## Matrices

• 2D array of numbers
• To identify an element you gotta use 2 indexes, whereas in a vector you would use 1 index
• The space of the matrix is denoted by:
• To denote the ith row, we say A(i, 🙂
• To denote the jth column, we say A(:, j)
• The notation for a transpose is, if you’re not sure, I’ll explain these later: