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-
Where the matrix A
is:
1 | 4 | 1 |
0 | 3 | 1 |
The vector x
is:
x |
y |
z |
And the vector b
is:
b1 |
b2 |
The generalized inverse
The augmented matrix reduces to this:
1 | 0 | 0 |
0 | 1 | 0 |
1 | 0 |
0 | 1 |
1 | -1 | -4 |
0 | 0 | 1 |
0 | 1 | -3 |
With this sequence of operations, one A‡
solution is:
1 | -1 |
0 | 0 |
0 | 1 |
The full solution is obtained with this formula:
The null-space vector n =
(I - A‡A) 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).
y = f2(t)
z = f3(t)
For linear equations, these may be written
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.
The solution to the equations above was
x =
A‡b + un
,
which is:
1 | -1 |
0 | 0 |
0 | 1 |
b1 |
b2 |
-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
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.
u | x | y | z |
-b1-b2 | -2b2 | b1+b2 | -3b1-2b2 |
-b2 | b1-2b2 | b2 | -2b2 |
-b1 | -b2 | b1 | -3b1+b2 |
b1-b2 | 2b1-2b2 | -b1+b2 | 3b1-2b2 |
0 | b1-b2 | 0 | b2 |
-b1+b2 | 0 | b1-b2 | -3b1+4b2 |
b1 | 2b1-b2 | -b1 | 3b1+b2 |
b2 | b1 | -b2 | 4b2 |
b1+b2 | 2b1 | -b1-b2 | 3b1+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
1 | -1 |
0 | 0 |
0 | 1 |
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
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.