Gaussian Elimination

Let’s consider a problem where we have to buy oranges and apples but under the following conditions. The difference between 2X the number of oranges and the number of apples should be 3. The sum of 4X the number of oranges and the number of apples should be 9. The difference between 5X the number of oranges and 3X the number of apples should be 7. System of Linear Equations These conditions could be modeled using the following equations...

July 16, 2024 · 10 min · Avnish

Matrices

A matrix is a rank 2 tensor i.e. an array expanding in a maximum of two independent dimensions. Multiple vectors could be arranged in rows or columns to create a matrix. $$\vec{a} = \begin{bmatrix} 5 \\ 6 \\ 7 \end{bmatrix}\ \ \vec{b} = \begin{bmatrix} 7 \\ 9 \\ 10 \end{bmatrix}$$ $$\textbf{A} = \begin{bmatrix} \vec{a} & \vec{b} \end{bmatrix} = \begin{bmatrix} 5 & 7 \\ 6 & 9 \\ 7 & 10 \end{bmatrix}$$...

July 12, 2024 · 8 min · Avnish
A vector is an array of data expanding in one dimension.

Vectors

A vector could represent the magnitude of a quantity broken down into its various components, for example, the velocity of an object moving on a 2D plane could be represented using the vector $\vec{v} = \begin{bmatrix} 8 & 9 \end{bmatrix}$. On a 2D plane $8$ and $9$ could be called the horizontal and vertical components of the vector $\vec{v}$ respectively. But the words horizontal and vertical on a 2D or 3D plane are relative to the viewer (try rotating the figure above anti-clockwise)....

July 10, 2024 · 4 min · Avnish
A tensor is an array of data expanding in multiple independent dimensions.

Tensors

In linear algebra, a tensor is an array of data expanding in multiple (or zero) independent dimensions. It is used to represent quantities/equations/functions with multiple components, for example, the equation $3x+2y=0$ could be represented with the tensor $[3\ 2\ 0]$ where each value in the tensor represents the different components of the equation. The number of independent dimensions of a tensor is called its rank. Vectors and matrices could be generalized with the term tensor....

July 3, 2024 · 3 min · Avnish
Arrays, Strings, and HashMaps

Arrays, Strings, and HashMaps

Data structures like arrays, strings, and hashmaps are available by default in most programming languages. They facilitate storage of large amounts of data in an efficient format which makes it easier (and sometimes relatively faster) to access during runtime. Arrays An array is a sequential store of data (referred to as elements). In languages like Python, an array can store elements with multiple data types, like, [1, "Hello, World", True] but for languages like Go, C++, and Java an array can store elements of a singular data type....

September 29, 2023 · 8 min · Avnish