# Linear Algebra - Linear combination

### Table of Contents

## 1 - Definition

A linear combination of the vectors <math>v_1, v_2, \dots,v_n</math> is the following expression:

<MATH>\alpha_1{v_1} + \alpha_2{v_2} + \alpha_n{v_n}</MATH>

where:

- The scalars <math>{\alpha_1}, {\alpha_2}, \dots,{\alpha_n}</math> are the coefficients

- Every vector in <math>\mathbb{R}^3</math> 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 <math>\mathbb{R}^3</math> . <math>\mathbb{R}^3</math> contains all 3-vectors over <math>\mathbb{R}</math>

## 2 - Articles Related

## 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 <math>v_1, \dots, v_n</math> over <math>\mathbb{R}</math> , a linear combination <math>\alpha_1{v_1} + \dots + \alpha_n{v_n}</math> is a convex combination if the coefficient are all non-negative and they sum to 1 :

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

- 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 <math>\alpha_1{u_1} + \alpha_2{u_2} + \dots + \alpha_n{u_n}</math> where <math>\alpha_1 + \alpha_2 + \dots + \alpha_n = 1</math> is called an affine combination.

The set of all affine combination of vectors <math>u_1, u_2, \dots, u_n</math> 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:

<MATH>\{\alpha_1{v_1} + \beta{v_2}: \alpha \in \mathbb{R}, \beta \in \mathbb{R}, \alpha + \beta = 1\}</MATH>

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 <math>\alpha_1</math> dish 1, <math>\alpha_2</math> dish 2, <math>\alpha_3</math> dish 3, the total resource utilization is:

<math>b = \alpha_1 v_1 + \alpha_2 v_2 + \alpha_n v_n</math>

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