# Linear Algebra - Linear combination

## 1 - Definition

A linear combination of the vectors $v_1, v_2, \dots,v_n$ is the following expression:

$$\alpha_1{v_1} + \alpha_2{v_2} + \alpha_n{v_n}$$

where:

• The scalars ${\alpha_1}, {\alpha_2}, \dots,{\alpha_n}$ are the coefficients
• Every vector in $\mathbb{R}^3$ is a linear combination:

[x, y, z] = (x/3) [3, 0, 0] + (y/2) [0, 2, 0] + z [0, 0, 1]


• Every linear combination is a vector in $\mathbb{R}^3$ . $\mathbb{R}^3$ contains all 3-vectors over $\mathbb{R}$

## 3 - Trivial

A linear combination is trivial if the coefficients are zero. The result is then the zero vector [0,0]


0[2,3.5]+0[4,10] = [0,0]



If at least one of the coefficients isn't zero, the solution is non-trivial.

## 4 - Conversion

From old vectors to new vectors (change of basis)

A linear combination of vectors can be converted into a linear combination of new vectors:

• [x, y, z] as a linear combination of the old vectors:

[x, y, z] = (x/3) [3, 0, 0] + (y/2) [0, 2, 0] + z [0, 0, 1]


• Intermediary Steps

[x, y, z] = (x/3)(3[1, 0, 0]) + (y/2) (-2 [1, 0, 0]+ 2 [1, 1, 0]) + z (-1 [1, 0, 0] -1 [1, 1, 0] + 1 [1, 1, 1] )


• [x, y, z] as a linear combination of the niew vectors:

[x, y, z] = (x - y - z)[1, 0, 0] + (y -z) [1, 1, 0] + z [1, 1, 1]



## 5 - Type

### 5.1 - Convex

For vectors $v_1, \dots, v_n$ over $\mathbb{R}$ , a linear combination $\alpha_1{v_1} + \dots + \alpha_n{v_n}$ is a convex combination if the coefficient are all non-negative and they sum to 1 :

$\{\alpha_1{v_1} + ... + \alpha_n{v_n} : \alpha_1 > 0, \dots ,\alpha_n > 0 : \alpha_1 + \dots + \alpha_n = 1\}$

• Convex hull of a single vector is a point.
• Convex hull of two vectors is a line segment.
• Convex hull of three vectors is a triangle

A convex hull of more vectors could be higher-dimensional but not necessarily. For example, a convex polygon is the convex hull of its vertices.

### 5.2 - Affine

A linear combination $\alpha_1{u_1} + \alpha_2{u_2} + \dots + \alpha_n{u_n}$ where $\alpha_1 + \alpha_2 + \dots + \alpha_n = 1$ is called an affine combination.

The set of all affine combination of vectors $u_1, u_2, \dots, u_n$ is called the affine hull of those vectors.

Example: The line through u and v consists of the set of a affine combinations of u and v:

$$\{\alpha_1{v_1} + \beta{v_2}: \alpha \in \mathbb{R}, \beta \in \mathbb{R}, \alpha + \beta = 1\}$$

The plane containing u1 = [3, 0, 0], u2 = [−3, 1,−1], and u1 = [1,−1, 1] is


u1 + Span {a,b}



where:

• a = u2 - u1
• b = u3 - u1

Since u1 + is a translation of a plane, it is also a plane.

• Span {a, b} contains 0, so u1 + Span {a, b} contains u1.
• Span {a, b} contains u2 - u1 so u1 + Span {a, b} contains u2
• Span {a, b} contains u3 - u1 so u1 + Span {a, b} contains u3.

Thus the plane u1 + Span {a, b} contains u1, u2, u3. Only one plane contains those three points, so this is that one.

New Formulation:

A linear combination where = 1 is an affine combination.

Affine hull of

This shows that the affine hull of some vectors is an affine space.

## 6 - Example

### 6.1 - Calculation


-5[2,3.5]+2[4,10] = [-5 x 2, -5 x 3.5]+[2 x 4, 2 x 10]



### 6.2 - Definition of receipt

• To make the dish 1

v1 = {tomato:1, salad:2, mozarella:1, paste:0, chorizo:0}


• To make the dish 2

v1 = {tomato:1, salad:0, mozarella:1, paste:1, chorizo:4}


• To make the dish 3

v1 = {tomato:0, salad:0, mozarella:1, paste:1, chorizo:4}



If the restaurant chooses to make $\alpha_1$ dish 1, $\alpha_2$ dish 2, $\alpha_3$ dish 3, the total resource utilization is:

$b = \alpha_1 v_1 + \alpha_2 v_2 + \alpha_n v_n$

Now, knowing the total resource utilization and the dishes, can we find out the scalars uniquely ?

Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry