---
title: "The Point-Set and Line-Set of a Plane"
canonical: "https://docs.magma-maths.org/v2.30-1/Geometry/FinitePlanes/point-line-set.html"
source: "https://docs.magma-maths.org/v2.30-1/Geometry/FinitePlanes/point-line-set.md"
part: "Geometry"
chapter: "Finite Planes"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Geometry", "source": "https://docs.magma-maths.org/v2.30-1/Geometry/index-geometry.md"}
  - {"title": "Finite Planes", "source": "https://docs.magma-maths.org/v2.30-1/Geometry/FinitePlanes/index-finite-planes.md"}
prev: {"title": "Construction of a Plane", "source": "https://docs.magma-maths.org/v2.30-1/Geometry/FinitePlanes/creation.md"}
next: {"title": "The Set of Points and Set of Lines", "source": "https://docs.magma-maths.org/v2.30-1/Geometry/FinitePlanes/point-line.md"}
intrinsics:
  - {"name": "PointSet", "signature": "PointSet(P): Plane -> PlanePtSet"}
  - {"name": "LineSet", "signature": "LineSet(P): Plane -> PlaneLnSet"}
  - {"name": ".", "signature": "V . i: PlanePtSet, RngIntElt -> PlanePt"}
  - {"name": "!", "signature": "V ! [a, b, c]: PlanePtSet, SeqEnum -> PlanePt"}
  - {"name": "!", "signature": "V ! [a, b]: PlanePtSet, SeqEnum -> PlanePt"}
  - {"name": "!", "signature": "V ! x: PlanePtSet, Elt -> PlanePt"}
  - {"name": "Representative", "signature": "Representative(V): PlanePtSet -> PlanePt"}
  - {"name": "Rep", "signature": "Rep(V): PlanePtSet -> PlanePt"}
  - {"name": "Random", "signature": "Random(V): PlanePtSet -> PlanePt"}
  - {"name": ".", "signature": "L . i: PlanePtSet, RngIntElt -> PlanePt"}
  - {"name": "!", "signature": "L ! [a, b, c]: PlaneLnSet, SeqEnum -> PlaneLn"}
  - {"name": "!", "signature": "L ! [m, b]: PlaneLnSet, SeqEnum -> PlaneLn"}
  - {"name": "!", "signature": "L ! S: PlaneLnSet, SetEnum -> PlaneLn"}
  - {"name": "!", "signature": "L ! S: PlaneLnSet, SeqEnum -> PlaneLn"}
  - {"name": "!", "signature": "L ! l: PlaneLnSet, PlaneLn -> PlaneLn"}
  - {"name": "Representative", "signature": "Representative(L): PlaneLnSet -> PlaneLn"}
  - {"name": "Rep", "signature": "Rep(L): PlaneLnSet -> PlaneLn"}
  - {"name": "Random", "signature": "Random(L): PlaneLnSet -> PlaneLn"}
  - {"name": "ParentPlane", "signature": "ParentPlane(V): PlanePtSet -> Plane, PlanePtSet, PlaneLnSet"}
  - {"name": "ParentPlane", "signature": "ParentPlane(L): PlaneLnSet -> Plane, PlanePtSet, PlaneLnSet"}
  - {"name": "ParentPlane", "signature": "ParentPlane(p): PlanePt -> Plane, PlanePtSet, PlaneLnSet"}
  - {"name": "ParentPlane", "signature": "ParentPlane(l): PlaneLn -> Plane, PlanePtSet, PlaneLnSet"}
examples:
  - "ex-afb4c8"
---

# The Point-Set and Line-Set of a Plane

## Introduction

An affine or projective plane in Magma consists of three objects: the plane $P$ itself, the *point–set* $V$ of $P$, and the *line–set* $L$ of $P$.

Although called the point–set and line–set, $V$ and $L$ are not actual Magma sets. They simply act as the parent structures for the points and lines (respectively) of the plane $P$, enabling easy creation of these objects via the `!` and `.` operators.

The point–set $V$ belongs to the Magma category `PlanePtSet`, and the line–set $L$ to the category `PlaneLnSet`.

In this section, the functions used to create point–sets, line–sets and the points, and lines themselves are described.

## Creating Point-Sets and Line-Sets

As mentioned above, the point–set and line–set are returned as the second and third arguments of any function which creates a plane. They can also be created via the following two functions.

<a id="function-pointset-plane"></a>
### `PointSet(P): Plane -> PlanePtSet`

Given a plane $P$, return the point–set $V$ of $P$.

<a id="function-lineset-plane"></a>
### `LineSet(P): Plane -> PlaneLnSet`

Given a plane $P$, return the line–set $L$ of $P$.

## Using the Point-Set and Line-Set to Create Points and Lines

For efficiency and clarity, the points and lines of a plane are given special types in Magma. The category names for points and lines are `PlanePt` and `PlaneLn` respectively. They can be created in the following ways.

<a id="operation-operation-planeptset-rngintelt-planept"></a>
### `V . i: PlanePtSet, RngIntElt -> PlanePt`

Given the point–set $V$ of a plane $P$ and an integer $i$, return the $i$-th point of $P$.

<a id="operation-op-planeptset-seqenum"></a>
### `V ! [a, b, c]: PlanePtSet, SeqEnum -> PlanePt`

Given the point–set $V$ of a classical projective plane $P = PG_2(K)$, and elements $a, b, c$ of the finite field $K$, create the projective point $(a : b : c)$ in the plane $P$.

<a id="operation-op-planeptset-seqenum-2"></a>
### `V ! [a, b]: PlanePtSet, SeqEnum -> PlanePt`

Given the point–set $V$ of a classical affine plane $P = AG_2(K)$, and elements $a, b$ of the finite field $K$, create the point $(a, b)$ in the plane $P$.

<a id="operation-op-planeptset-elt"></a>
### `V ! x: PlanePtSet, Elt -> PlanePt`

Given the point–set $V$ of a plane $P$, return the point of $P$ corresponding to the element $x$, which should be coercible into the underlying point set for $P$. (In the case of classical planes, $x$ should be coercible to a vector.)

<a id="function-representative-planeptset"></a>
### `Representative(V): PlanePtSet -> PlanePt`

<a id="function-rep-planeptset"></a>
### `Rep(V): PlanePtSet -> PlanePt`

Given the point–set $V$ of a plane $P$, return a representative point of $P$.

<a id="function-random-planeptset"></a>
### `Random(V): PlanePtSet -> PlanePt`

Given the point–set $V$ of a plane $P$, return a random point of $P$.

<a id="operation-operation-planeptset-rngintelt-planept-2"></a>
### `L . i: PlanePtSet, RngIntElt -> PlanePt`

Given the line–set $L$ of a plane $P$ and an integer $i$, return the $i$-th line of $P$.

<a id="operation-op-planelnset-seqenum"></a>
### `L ! [a, b, c]: PlaneLnSet, SeqEnum -> PlaneLn`

Given the line set $L$ of a classical plane $P$ defined over a finite field $K$, and elements $a, b, c$ of $K$, create the line $\left<a : b : c\right>$ (i.e. the line given by the equation $ax + by + cz = 0$ if $P$ is projective, or $ax + by + c = 0$ if $P$ is affine).

<a id="operation-op-planelnset-seqenum-2"></a>
### `L ! [m, b]: PlaneLnSet, SeqEnum -> PlaneLn`

Given the line set $L$ of a classical affine plane $P = AG_2(K)$, and elements $m, b$ of the finite field $K$, create the affine line $y = mx + b$ in $P$.

<a id="operation-op-planelnset-setenum"></a>
### `L ! S: PlaneLnSet, SetEnum -> PlaneLn`

<a id="operation-op-planelnset-seqenum-3"></a>
### `L ! S: PlaneLnSet, SeqEnum -> PlaneLn`

Given the line–set $L$ of a plane $P$ and a set or sequence $S$ of collinear points of $P$, return the line containing the points of $S$.

<a id="operation-op-planelnset-planeln"></a>
### `L ! l: PlaneLnSet, PlaneLn -> PlaneLn`

Given the line–set $L$ of a plane $P$ and a line $l$ of a (possibly) different plane (generally a subplane of $P$), return the line of $P$ corresponding to $l$.

<a id="function-representative-planelnset"></a>
### `Representative(L): PlaneLnSet -> PlaneLn`

<a id="function-rep-planelnset"></a>
### `Rep(L): PlaneLnSet -> PlaneLn`

Given the line–set $L$ of a plane $P$, return a representative line of $P$.

<a id="function-random-planelnset"></a>
### `Random(L): PlaneLnSet -> PlaneLn`

Given the line–set $L$ of a plane $P$, return a random line of $P$.

<a id="example-ex-afb4c8"></a>
### `Example: Creating Points and Lines (ex-afb4c8)`

The following example shows how points and lines of a plane can be created. First we study a classical projective plane.

```magma
> P, V, L := FiniteProjectivePlane(5);
> V;
Point-set of Projective Plane PG(2, 5)
> L;
Line-set of Projective Plane PG(2, 5)
```

Create the third point of $P$:

```magma
> V.3;
( 0 : 0 : 1 )
```

Create the point $(1:2:3)$ of $P$:

```magma
> V![1, 2, 3];
( 1 : 2 : 3 )
```

Choose a random point of $P$:

```magma
> Random(V);
( 1 : 0 : 0 )
> Random(V);
( 0 : 0 : 1 )
```

Create the sixth line of $P$:

```magma
> L.6;
< 1 : 1 : 3 >
```

Create the line of $P$ given by the equation 4x + 3y + 2z = 0:

```magma
> L![4, 3, 2];
< 1 : 2 : 3 >
```

Create the line of $P$ containing the points $(0:0:1)$ and $(0:1:0)$:

```magma
> L![ V | [0, 0, 1], [0, 1, 0] ];
< 1 : 0 : 0 >
```

Get a representative from the line-set of $P$, and a random line:

```magma
> Rep(L);
< 1 : 0 : 0 >
> Random(L);
< 1 : 2 : 4 >
```

Now we look at a non-classical plane.

```magma
> V := {2, 4, 6, 8};
> A, P, L := FiniteAffinePlane< SetToIndexedSet(V) | Setseq(Subsets(V, 2)) >;
> A: Maximal;
Affine Plane of order 2
Points: {@ 2, 4, 6, 8 @}
Lines:
    {6, 8},
    {2, 6},
    {2, 8},
    {2, 4},
    {4, 6},
    {4, 8}
> P;
Point-set of Affine Plane of order 2
> L;
Line-set of Affine Plane of order 2
```

Get the third point of $A$:

```magma
> P.3;
6
```

Create the point of $A$ given by the integer 4:

```magma
> P!4;
4
```

Get a representative from the point–set of $A$:

```magma
> Rep(P);
2
```

Get the third line of $A$:

```magma
> L.3;
{2, 8}
```

Create the line of $A$ containing the integers 2 and 6:

```magma
> L![2, 6];
{2, 6}
```

Choose a random line from $A$:

```magma
> Random(L);
{6, 8}
```

## Retrieving the Plane from Points, Lines, Point-Sets, and Line-Sets

The `ParentPlane` function allows you to access the plane to which a point, line, point–set, or line–set belongs.

<a id="function-parentplane-planeptset"></a>
### `ParentPlane(V): PlanePtSet -> Plane, PlanePtSet, PlaneLnSet`

The plane $P$ for which $V$ is the point–set.

<a id="function-parentplane-planelnset"></a>
### `ParentPlane(L): PlaneLnSet -> Plane, PlanePtSet, PlaneLnSet`

The plane $P$ for which $L$ is the line–set.

<a id="function-parentplane-planept"></a>
### `ParentPlane(p): PlanePt -> Plane, PlanePtSet, PlaneLnSet`

The plane $P$ for which $p$ is a point.

<a id="function-parentplane-planeln"></a>
### `ParentPlane(l): PlaneLn -> Plane, PlanePtSet, PlaneLnSet`

The plane $P$ for which $l$ is a line.
