Matrix methods for equation of a line

In summary, to find the constants a, b, and c for the line crossing two points on R2 using matrix methods, we can rescale the equation and use the two points to solve for a and b. If the determinant of the two points is 0, indicating they are parallel, the line will pass through the origin. Otherwise, we can use either point to find the single parameter determining the line.
  • #1
zcd
200
0
Given two points on R2 how would one find the constants a,b,c such that
ax+by+c=0 gives the line crossing the two points (with matrix methods)?
 
Physics news on Phys.org
  • #2
So you're given the points [itex]\vec{p}_1=(x_1, y_1)[/itex] and [itex]\vec{p}_2=(x_2, y_2)[/itex].

A line is given by the equation

[itex]
a x + b y
=\begin{pmatrix} a & b \end{pmatrix} \cdot \begin{pmatrix} x \\ y \end{pmatrix}
= c
[/itex]

Which, assuming [itex]c \neq 0[/itex], can be rescaled to
[itex]
\begin{pmatrix} a & b \end{pmatrix} \cdot \begin{pmatrix} x \\ y \end{pmatrix} = 1
[/itex]
Then the two points must satisfy
[itex]\begin{align}
&\begin{pmatrix} a & b \end{pmatrix}\cdot\begin{pmatrix}x_1&x_2 \\ y_1&y_2\end{pmatrix} = \begin{pmatrix} 1 & 1 \end{pmatrix} \\
\implies
&\begin{pmatrix} a & b \end{pmatrix} = \begin{pmatrix} 1 & 1 \end{pmatrix}
\begin{pmatrix}x_1&x_2 \\ y_1&y_2\end{pmatrix}^{-1}
=\frac{1}{x_1 y_2 - x_2 y_1}\begin{pmatrix} y_1-y_2 & x_1-x_2\end{pmatrix}
\end{align}[/itex]
And so we have the equation for the line. (This is just "[URL rule[/URL])

Note that if [itex] \det(\vec{p}_1, \vec{p}_2) = x_1 y_2 - x_2 y_1 = 0 \,, [/itex] (which happens when [itex] \vec{p}_1\propto\vec{p}_2[/itex])
then the above does not make sense and the line must go through the origin, i.e. [itex]c=0[/itex].
In which case,
[itex] a x = - b y \quad \implies \quad y = -\frac{a}{b}x [/itex]
and we can just use either point to find the single parameter determining the line
[itex] \frac{a}{b} = -\frac{y_1}{x_1} = -\frac{y_2}{x_2} \ .[/itex]
 
Last edited by a moderator:

FAQ: Matrix methods for equation of a line

What are matrix methods for equation of a line?

Matrix methods for equation of a line refer to the use of matrices to represent and solve equations of a line. This involves converting the equation into matrix form and using matrix operations to find the solution.

How do you convert an equation of a line into matrix form?

To convert an equation of a line into matrix form, you can represent the coefficients and variables as a matrix, and the constants as a column vector. The equation can then be written as a matrix multiplication of these two matrices.

What are the benefits of using matrix methods for equation of a line?

Matrix methods for equation of a line can provide a more efficient and organized way of solving equations, especially when dealing with systems of equations. It also allows for easy manipulation and transformation of equations using matrix operations.

Can matrix methods be used for any type of equation of a line?

Matrix methods can be used for linear equations of a line, meaning equations that can be written in the form y = mx + b. However, they may not be applicable for non-linear equations, such as circles or parabolas.

Are there any limitations to using matrix methods for equation of a line?

One limitation of using matrix methods for equation of a line is that it may not be suitable for solving equations with complex variables, such as trigonometric functions. Additionally, it may not be the most intuitive approach for some individuals.

Similar threads

Replies
6
Views
2K
Replies
14
Views
2K
Replies
3
Views
1K
Replies
17
Views
3K
Replies
2
Views
921
Back
Top