Solution set (source code)

= Solution set
{title2=$S=\{x\in D:P(x)\}$}

The <solution set> of a mathematical condition $P$ in a specified <domain> $D$ collects every allowed value that satisfies it:
$$
S=\{x\in D:P(x)\}.
$$
It describes the answer without committing to the steps used to find it. For the <equation> $x^2=1$ over the <real numbers>, the <solution set> is $\{-1,1\}$; restricting to positive <real numbers> leaves $\{1\}$. For $2x=1$, the <solution set> is $\{1/2\}$ over the <rational numbers> and the <empty set> over the <integers>. The domain is part of the question.

An <equation> can have one solution, several solutions, no solutions, or an entire domain of solutions. Over the <real numbers>, $2x+3=9$ gives the <singleton set> $\{3\}$, $x^2+1=0$ gives the <empty set>, and the <mathematical identity> $(x+1)^2=x^2+2x+1$ gives the whole <real line>. Changing that second equation's domain to the <complex numbers> gives $\{-i,i\}$. The elementary definition by values that satisfy an <equation> and the classification by <solution sets> appear in https://openstax.org/books/college-algebra-2e/pages/2-2-linear-equations-in-one-variable[College Algebra 2e, §2.2: Solving Linear Equations in One Variable].

\Image[/equivalent-linear-equation-intersections.png]
{title=Three <equivalent equations> have the same <singleton set> of solutions $\{3\}$, even though their displayed function values differ}

Requiring several conditions simultaneously takes the <intersection> of their <solution sets>. The squared <equation> $x=(x-2)^2$ has <solution set> $\{1,4\}$. Adding the restriction $x\geq2$ gives
$$
\{1,4\}\cap[2,\infty)=\{4\},
$$
which is also the <solution set> of $\sqrt{x}=x-2$. The <extraneous solution> example explains why the sign restriction is needed. Requiring at least one of several conditions instead takes their <union>. This turns logical combinations of constraints into reusable operations on <sets>.

For several <variables>, a solution is an ordered assignment, usually represented by a <tuple>. The real <equation> $x+y=1$ has <solution set> $\{(t,1-t):t\in\mathbb R\}$, a <straight line> in the <Euclidean plane> with coordinates $(x,y)$. Adding $x-y=0$ intersects that <straight line> with another, leaving the single <tuple> $(1/2,1/2)$. A <system of linear inequalities> has no solution exactly when the <intersection> of its individual <solution sets> is the <empty set>. For <optimization constraints>, this common <solution set> is the <feasible region>.

Because a <solution set> is a <set>, the order in which its members are listed is irrelevant. The <multiple root> of $(x-1)^2=0$ is still the one solution $1$; its <multiplicity of a root> is additional polynomial information, rather than a second occurrence inside the <solution set>. <Equivalent equations> preserve the <solution set> on the stated domain, even if their algebraic forms differ.