## 2007-10-30

### Plane Affine Algebra (II)

See also Part I and Part III.

As noted before, the algebra permits us to calculate proofs without resorting to coordinate manipulations. As a demonstration, I'll present a very simple calculation, and then a theorem that I didn't know (and I would be very hard-pressed to come up with a classical proof).

Given points P, Q, R, the altitude of the triangle PQR through the vertex Q is the segment QH perpendicular to the base PR. Denoting `hgt`.P.Q.R = |QH| (we write |•−•| = |‹•−•›| per abusum linguae), it is:

```(17)  `hgt`.P.Q.R = (‹R−P›⊥⋅‹Q−P›)/|R−P|
```

Proof:

```   `hgt`.P.Q.R
= { definition }
|Q−H|
= { definition of the sine line }
|Q−P|·sin.(`θ`.‹R−P›.‹Q−P›)
= { (16) with u, v := ‹R−P›, ‹Q−P› }
(‹R−P›⊥⋅‹Q−P›)/|R−P|
```

The line through point P with direction vector v is the set of points Pv that, in the words of Euclid, "lies equally on the points of itself":

```(18.0)  Q ∈ P⇒v ≡ |v|⋅‹Q − P› = |Q − P|⋅v
```

The following are theorems:

```(18.1)  P ∈ P⇒v
(18.2)  ⟨∀ k : k ≠ 0 : P⇒(k⋅v) = P⇒v ⟩
(18.2)  P⇒v = ⟨k ∈ R | P → k⋅v⟩
```

The parametric line through points P and Q is defined as the real function:

```(18)  `ray`.P.Q.k = P → k·‹Q−P›
```

From (18.2), it is immediate that `ray`.P.Q maps R to the line P⇒‹QP›.

As a special case, the midpoint of the segment PQ is:

```(19)  `ray`.P.Q.½ = P → ½·‹Q−P›
```

Given points P, Q, R and S, the intersection of the lines containing the segments PQ and RS is:

```(20)  `meet`.P.Q.R.S = `ray`.P.Q.((‹S−R›⊥⋅‹R−P›)/(‹S−R›⊥⋅‹Q−P›))
```

Proof: At the intersection point `meet`.P.Q.R.S, for some k, lR:

```   `ray`.P.Q.k = `ray`.R.S.l
= { (18) }
P → k·‹Q−P› = R → l·‹S−R›
= { (6) }
‹(P → k·‹Q−P›) − (R → l·‹S−R›)› = 0
= { (9) }
‹P−R› + k·‹Q−P› − l·‹S−R› = 0
= { heading towards eliminating l; inner product }
‹S−R›⊥⋅(‹P−R› + k·‹Q−P› − l·‹S−R›) = 0
= { linearity of inner product }
‹S−R›⊥⋅‹P−R› + k·‹S−R›⊥⋅‹Q−P› − l·‹S−R›⊥⋅‹S−R› = 0
= { (14) }
‹S−R›⊥⋅‹P−R› + k·‹S−R›⊥⋅‹Q−P› = 0
= { (5); algebra }
k = (‹S−R›⊥⋅‹R−P›)/(‹S−R›⊥⋅‹Q−P›)
```

In Part III, the theorem.