Pertains to squares or squaring. Use this tag for questions relating to quadratic equations, quadratic regression, and similar concepts in the context of programming as defined in the Help Center. It may also be used for questions regarding quadratic probing and quadratic time complexity.
Quadratic means to the second (2nd) power, that means, squares (in algebra), or squaring. This tag is used for questions relating to quadratic equations, regression, and similar programming contexts involving quadratic polynomials or terms.
A quadratic polynomial is a polynomial of degree 2. All quadratic polynomials of a single variable x
is of the form ax^2 + bx + c
where the quadratic coefficient a != 0
. The graph of a quadratic function is a parabola, with open end up if a > 0
, and down if a < 0
. All quadratic polynomials have exactly two complex roots, and can have either two, one, or zero real roots. The famous quadratic formula, applicable for all quadratic polynomials ax^2 + bx + c
with real or complex coefficients a,b,c
, is given by x = (-b ± sqrt(b^2 - 4*a*c)) / (2*a)
.
Here are the graphs of three quadratic functions with color coding
A quadratic regression is a method of finding a parabola, represented as a quadratic polynomial of best fit in a set of data. The chart below shows an example of finding a parabola extrapolating the known data points.
Quadratic Complexity means complexity of O(n^2)
. That means, it grows similar to a positive quadratic function ax^2 + bx + c, a > 0
as x
grows, precisely, f(x) == O(x^2)
if f(x)/x^2
is constant. There are two forms of quadratic complexity: quadratic space and quadratic time, indicating that this program or algorithm asymptotically requires extra memory space or took time equal to the square of the size of the input n
respectively. Selection sort is an example of a quadratic time algorithm. Linear or better complexity is also within quadratic complexity.