Symmetric and Parametric Line Equations

Let's start with a set of equations that is linear and obviously under-specified:

x+4y+z=b1
3y+z=b2

In vector form-

Ax = b

Where the matrix A is:

141
031

The vector x is:

x
y
z

And the vector b is:

b1
b2

The generalized inverse

The augmented matrix reduces to this:

100
010
10
01
1-1-4
001
01-3

With this sequence of operations, one A solution is:

1-1
00
01

The full solution is obtained with this formula:

x = Ab + (I - AA) z

The null-space vector n = (I - AA) z is:

-z2
z2
-3z2

The resulting x is:

b1-b2-z2
z2
b2-3z2

To avoid confusion for the next part, I'll exchange z2 with u. That makes the above vectors slightly simpler:

-u
u
-3u

for n (the null-space vector) and for the general solution of x:

b1-b2-u
u
b2-3u

Line equations

The two equations we started with at the top of this page are simple linear equations, and the rank is one short of being fully specified. Therefore, the solution is not a simple point, but an infinite number of points; all in a straight line. If the starting equations were not simple linear ones, the result might be a curve or some more interesting figure.

Two dimensional lines (Cartesian coordinate system) are written in terms of each other like
y = m•x + b, or equivalently
f(x) = m•x + b. Where m is the slope of the line and b is the intercept on the f(x) axis.

The line through one point (x1,y1) in Cartesian coordinates is
y = m•(x - x1) + y1. For example, if the point is (1,4) and the slope is 2, the equation for the straight line is
y = f(x) = 2•(x -1) +4 which reduces to the y-intercept form of the equation f(x) = 2•x +2.

The line through two points (x1,y1) and (x2,y2) in Cartesian coordinates is

(y - y1) / (y2 - y1) = (x - x1) / (x2 - x1)

Lines in higher dimensions

Lines in more dimensions are usually written in parametric or symmetric form instead of relating one variable to another. The parametric equation for a line has a parametric variable t (often taken to be a time-dependent variable).

x = f1(t)
y = f2(t)
z = f3(t)

For linear equations, these may be written

x = x0 + t•d
y = y0 + t•e
z = z0 + t•f

Solve for the variable t and equate these expressions to get the symmetric equations of a line.

t = (x -x0) / d = (y -y0) / e = (z -z0) / f

The solution to the equations above was x = Ab + un, which is:

1-1
00
01
*
b1
b2
+ u *
-1
1
-3
=
b1-b2+u
-u
b2+3u

The parametric equation of the line

Two points in the resulting line are (b1-b2, 0, b2) and (b1-b2+u, -u, b2+3u) (chosen arbitrarily). The vector connecting these two points (which must lie along the line connecting these points) is (-u, u, -3u) which is u•n.

This makes the vector equation of the line F = (b1-b2, 0, b2) + un (one point plus the scaled vector along the line), which is also written F = (b1-b2+u, -u, b2+3u). This may be separated into the (x, y, z) equations

x
y
z
=
b1-b2+u
-u
b2+3u

which was the original solution for the x vector!

From this general solution the equation of the line may be written directly

u = (x -(b1 -b2)) / 1 = (y) / -1 = (z -b2) / 3

where the parametric variable is now u.

Confirming the Solution

Confirm this is the equation for the line that results when the equations at the top of this page are solved by choosing values for u and getting the x vector which when multiplied by the original A matrix yield the b vector.

uxyz
-b1-b2-2b2b1+b2-3b1-2b2
-b2b1-2b2b2-2b2
-b1-b2b1-3b1+b2
b1-b22b1-2b2-b1+b23b1-2b2
0b1-b20b2
-b1+b20b1-b2-3b1+4b2
b12b1-b2-b13b1+b2
b2b1-b24b2
b1+b22b1-b1-b23b1+4b2

The A matrix times any of these points in the table yields the b vector

Therefore, all the points in this table are on the line which is the solution to the original under-specified problem.

We can multiply the pseudo-inverse A times the b vector to get one point p on the line

p =
1-1
00
01
*
b1-b2+u
-u
b2+3u
=
b1-b2
0
b2

This point, together with the null space vector may be plugged directly into the parametric equation of the line

u = (x -px) / nx = (y -py) / ny = (z -pz) / nz

where the nx, ny, and nz are the null-space vector components. And the px, py, and pz are the components of the arbitrary point p on the line, calculated above.

Infinite Line Equations

The equation would have different constants if the starting point was one of the other pseudo-inverses. Since there are an infinite number of pseudo-inverses for this under-specified problem, there are an infinite number of solutions. However, all the solutions will yield the same line, even if the equation for the line looks different.

If the problem was less specified (perhaps one equation and three unknowns), the solution would be a plane (for simple linear equations) or surface instead of a line or a curve. This is information that is not readily available from the Moore-Penrose pseudo-inverse, which gives no indication of the rank of the original problem or the null space of the solution or problem space and what these mean.