# Linear Algebra - (Line|Line Segment)

### Table of Contents

## 1 - About

Geometry - Line in linear algebra.

Line and line segment definition in Linear Algebra that goes:

A line has a dimension of one because only one coordinate is needed to specify a point on it

## 2 - Articles Related

## 3 - Line vs Line Segment

The below definitions applied to a line and to a line segment by changing the scalar range.

## 4 - Through the origin

### 4.1 - One-dimensional

The line through the **origin** and the vector v (the point v) is the set of points where the scalar <math>\alpha</math>
ranges over all real numbers:

<math>\{\alpha. v : \alpha \in \mathbb{R}, 0 <= \alpha <= 1\}</math>

where:

- v is a vector
- <math>\alpha</math> is a Number System - Real Number (Scalar) - <math>\mathbb{R} </math>

forms the line through the origin and the vector v (ie the point)

### 4.2 - Three-dimensional

```
# Line in three dimension
{[x, y, z] : a * [x, y, z] = 0, b * [x, y, z] = 0}
```

## 5 - Not through the origin

Definition of a line that goes through the vector u and v (where u and v are not the origin)

### 5.1 - Translation and Scalar multiplication Formulation

Vector Translation and vector scalar multiplication are used to defined set of points forming an line segment (because the scalar <math>\alpha</math> ranges not in <math>\mathbb{R}</math> and is then in a finite set) that not necessarily go through the origin.

You translate the line by adding a vector c [0.5, 1] to every point of the line segment from [0, 0] to [3, 2].

<math>\{[0.5, 1] + \alpha [3, 2] : 0 <= \alpha <= 1\}</math>

The result is a line through c instead of through origin.

### 5.2 - Symmetric Formulation (Affine,Convex)

A new formulation which is symmetric with respect to endpoints (ie you have a coefficient on [3, 2] and on [0.5, 1]) is:

<math>\{\alpha [3.5, 3] + \beta [0.5, 1] : (\alpha, \beta) \in \mathbb{R}, (\alpha, \beta) >= 0, \alpha + \beta = 1\}</math>

You get it by using distributivity: <math>\alpha(u+v)=\alpha.u+\alpha.v</math>

[3,2]+[0.5,1] | = ([3.5,1]-[0.5,1])+[0.5,1] = [3.5,1]+(1-)[0.5,1] = [3.5,1]+[0.5,1] |

This formulation describes the line that goes through the point [3.5, 3] and [0.5, 1].

More generally, the line through the vector u and v consists of the set of a affine combinations of u and v:

<MATH>\{\alpha{u} + \beta{v}: (\alpha, \beta) \in \mathbb{R}, \alpha + \beta = 1\}</MATH>

## 6 - Combination

To resume:

- a finite Line Segment can be described by a convex linear combination
- an infinite line Segment (a line) can be described by a affine linear combination

### 6.1 - Convex

A convex combination represents a Finite Line Segment.

An expression **with two vectors** of the form:

<math>\{\alpha.u + \beta.v : (\alpha, \beta) \in \mathbb{R}, (\alpha, \beta) >= 0, \alpha + \beta = 1\}</math>

is called a convex combination of u and v.

### 6.2 - Affine

Infinite line Segment

An expression of the form **u** + where is called an a affine combination of **u** and **v**.

**u**and

**v**consists of the set of affine combinations of

**u**and

**v**