I'm trying to find (or derive) a formula for the least-squares fitted line in polar coordinates. I've worked out a least-squares formula for a line that passes through the origin, but I'm trying to find the more general solution for a line that doesn't necessarily pass through the origin. In other words, given a set of polar coordinates, I want to find a line expressed by $r(\theta)=p\sec(\theta-\phi)$, where parameters $p$ and $\phi$ are determined by least squares, and represent the point $(p,\phi)$ on the resulting line closest to the origin.
2026-04-07 08:21:28.1775550088
Least-squares equation for line in polar coordinates
157 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in POLAR-COORDINATES
- Second directional derivative of a scaler in polar coordinate
- polar coordinate subtitution
- $dr$ in polar co-ordinates
- Finding the centroid of a triangle in hyperspherical polar coordinates
- Arc length of polar function and x interceps
- Evaluation of $I=\iint_R e^{-(x^2+y^2)} \,dx\,dy$ by change of variable
- Finding area bound by polar graph
- Question about the roots of a complex polynomial
- Polar Area Integral with Absolute Function
- How to compute 'polar form' of a line given two points in cartesian coordinate system?
Related Questions in LEAST-SQUARES
- Is the calculated solution, if it exists, unique?
- Statistics - regression, calculating variance
- Dealing with a large Kronecker product in Matlab
- How does the probabilistic interpretation of least squares for linear regression works?
- Optimizing a cost function - Matrix
- Given matrix $Q$ and vector $s$, find a vector $w$ that minimizes $\| Qw-s \|^2$
- Defects of Least square regression in some textbooks
- What is the essence of Least Square Regression?
- Alternative to finite differences for numerical computation of the Hessian of noisy function
- Covariance of least squares parameter?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
The line equation with homogeneous coordinates $(a,b,c)$ is $$a x + b y + c = 0$$
In polar form with $(x= r \cos \theta, \, y = r \sin \theta)$ the above is
$$ r = \frac{- c}{a \cos \theta + b \sin \theta} $$
This means that $r = p \sec ( \theta - \phi)$ is actually
$$ r = \frac{p}{\cos \phi \cos \theta + \sin \phi \sin \theta} $$
so the homogeneous coordinates of the line is $(a = \cos \phi, b = \sin \phi, c = -p)$
$$ (\cos \phi)\, x + (\sin \phi)\, y = p$$
So do the least squares using $(a) x + (b) y + (c) =0$ and then convert to polar using the polar form from above.
Do the least squares on the canonical form of a line $(a^\star)\, x + (b^\star)\, y = 1$ using a Vandermode matrix.
$$ A = \left| \begin{array}{ccc} x_1 & y_1 \\ x_2 & y_2 \\ \vdots & \vdots \\ x_n & y_n \\ \end{array} \right| $$
$$ b = \left| \begin{array}{c} 1 \\ 1 \\ \vdots \\ 1 \end{array} \right| $$
$$ \pmatrix{a^\star \\ b^\star} = \left( A^\intercal A \right)^{-1} A^\intercal b $$
so $(a=a^\star, b = b^\star, c = -1)$ or in polar form $$(a^\star= \cos \phi, b^\star = \sin \phi, p= \frac{1}{\sqrt{(a^\star)^2 + (b^\star)^2}})$$
In fact, doing the least squares solution directly to the polar equation is equivalent to the above.
This is because the polar form of the i-th point $(r_i, \theta_i)$ can be written as $$ \tfrac{1}{p} \left(r_i \cos \phi \cos \theta_i + r_i \sin \phi \sin \theta_i \right) = 1$$
This produces the following Vandermode matrix (which as you can see contains the cartesian coordinates of each point).
$$ A = \tfrac{1}{p} \left| \begin{array}{ccc} r_i \cos \theta_1 & r_i \sin \theta_1 \\ r_i \cos \theta_2 & r_i \sin \theta_2 \\ \vdots & \vdots \\ r_i \cos \theta_n & r_i \sin \theta_n \\ \end{array} \right| $$
$$ b = \left| \begin{array}{c} 1 \\ 1 \\ \vdots \\ 1 \end{array} \right| $$
with solution
$$ \pmatrix{a^\star \\ b^\star} = \pmatrix{p \cos \phi \\ p \sin \phi} = \left( A^\intercal A \right)^{-1} A^\intercal b $$