14

IMPORTANT EDIT: I've noticed that people are focussing too much on my examples that they're distracted by my real question which is logic based. I use various examples to explain my "logic based" confusion, I'm not confused about the examples. I do not require explanations for my examples.


This question stems from a question I asked long long long time ago and someone answered that it is incorrect to write $|x|=±x$ and I took their word for it because well... I wasn't experienced enough to ask the right questions.

Since then my instinct to deal with $|x|$ has been to use: $$ |x|= \begin{cases} x, \ x≥0 \\\\ -x, \ x <0 \end{cases}$$

because well... that is the definition of $|x|$.

However I was going through my questions yesterday, when I realised, "Wait hold on, why is the equation $|x|=±x$ incorrect? Because "$±$" means "plus OR minus", you're not insisting that $|x|$ is $x$ AND $-x$. You're only saying it is either $x$ OR $-x$.


But hold on, there's more. With that argument in mind, you can always write $\sqrt{9}=±3$ even though it's just $3$. You can even go more bonkers with this logic by writing $$\sqrt{9} = 3 \text{ or } -3 \text{ or } -193e^2$$ as long as one of them is true. You get the point, right?

You can keep adding on nonsense using the fact that $T \equiv T \vee F$ like so:

$$\sin x = 0 \quad\equiv\quad \sin x =0 \;\text{ or }\; \cos x = 0$$ and then get $x \in \{\frac{nπ}{2} : n \in \mathbb{Z}\}$ as the solution, which is absurd.

Where is the logical error here?

ryang
  • 38,879
  • 14
  • 81
  • 179
William
  • 4,893
  • 2
    When using the symbol $\sqrt{}$, you have to define what it means. Commonly, it is defined as the function $\sqrt : \quad \mathbb R \to [0, +\infty)$, $x , \mapsto \sqrt{x} = { y\in [0, +\infty) ,\text{ s. t. } ,y^2 = x } $. One can define $\sqrt{}$ differently, but then $\sqrt 9 = \pm 3$ wouldn't be true for both results. – Miguel Mars Aug 22 '21 at 11:13
  • @MiguelMars I know that. But I request that you read my question through to the end. That's not my question. I know that. My question is supposed to be about "logic". – William Aug 22 '21 at 11:15
  • I think it is better to interpret $y = \pm a$ as $y \in {-a, a}$ which eliminates the possibility of adding nonsense. – Infinity_hunter Aug 22 '21 at 11:19
  • 4
    I think people are focussing too much on the $|x| = \pm x$ that they're not recognising my question is logic based really. Not calculus. I'd be grateful if someone could recommend suggestions to improve my question. – William Aug 22 '21 at 11:19
  • 1
    Ok, I understand now the question. I think in Mathematics, we use the equality symbol in a way that $x = {\text{Set of solutions}}$ means that $ x = s $ is true for every $s$ in the set of solutions. – Miguel Mars Aug 22 '21 at 11:29
  • @William I think the error lies here: You are correct in saying that $(\sin (x) = 0) \implies (\sin(x) = 0 \text{ or} \cos(x) = 0)$. However this does not mean $(\sin(x) = 0 \text{ or} \cos(x) = 0) \implies (\sin(x) = 0)$, which is what you're inferring by setting $\cos(x) = 0$ and assuming the original statement $\sin(x) = 0$ holds. A quick google search of "necessary and sufficient conditions" should yield helpful results. – egglog Aug 22 '21 at 12:53
  • @egglog Yes, thank you for your comment but I already figured out that was the flaw in my reasoning thanks to the answers, I have upvoted. I casually decided they were equivalent " $\Leftrightarrow$" without fully realizing that they were equivalent for only a certain set of values. – William Aug 22 '21 at 13:01
  • Do +0 and -0 have meaning? I would think that a positive number would get defined as a number greater than 0, and a negative 0 as a number less than zero, and thus neither +0 nor -0 have meaning. Thus, I'm not so sure that for all x, where x is an integer |x|=±x holds true. Also, |x|=±x isn't true when the domain is a set of only negative numbers. Since |x| is positive, -x does not exist (within the domain of discourse), and thus |x|=±x can't get asserted as true for that domain of discourse. – Doug Spoonwood Aug 22 '21 at 21:21
  • @William People are focusing on the example because $\pm$ is not a logical symbol, unless you define it so, which is what I tried to emphasize in my answer. – Miguel Aug 23 '21 at 09:29
  • IMO there is only a misunderstanding... no case of True equiv to True or False ( that if we red as a popositoonal formula with truth-value constant IS correct). We have more $=|x| ↔[(x \ge 0∧=x) ∨ (x \lt 0∧y=-x)]$ – Mauro ALLEGRANZA Sep 26 '21 at 14:26
  • So IMO there is confusion: $\text T \equiv \text T \lor \text F$ is simply not the correct logical analysis of the mathematical definition by cases ( that is fine ). – Mauro ALLEGRANZA Sep 26 '21 at 14:38

8 Answers8

18

I will focus on your problem with $T\iff T\lor F$.

Sure, under assumption that some formula $A(x)$ depending on a parameter $x$ is true (independent of the value for $x$), you may use that to deduce that $A(x)\iff A(x)\lor B(x)$ (since $T\iff T$).

However, in your examples, the formula $A(x)$ only holds true for some special values of $x$. It could thus happen that for some values of $x$, $A(x)$ fails to hold, while $B(x)$ is true. In this case, you can clearly not write $A(x)\iff A(x)\lor B(x)$ (since $F$ is not equivalent to $T$).

Zuy
  • 4,656
  • 4
    Finally a sensible answer. – Hans Lundmark Aug 22 '21 at 12:07
  • 1
    This is such an important answer. 'paramterized truths' it all makes sense now. – tryst with freedom Aug 22 '21 at 12:12
  • @HansLundmark I know, finally. I think the "edit" in my question really helped. – William Aug 22 '21 at 12:15
  • So, by this I take it that $|x| = \pm x$ is a logically correct equation correct equation, yes? – William Aug 22 '21 at 12:34
  • 1
    @William Sure! As commented by others, one just needs to make sure that people don't misinterprete it. – Zuy Aug 22 '21 at 12:42
  • 1
    @Zuy Thanks! I guess this answer is going to be it. I'll probably accept this answer but I'll wait a while. "One just needs to make sure that people don't misinterpret it", I honestly can't see what could be the misinterpretation of that equation. It does pretty much what it says. Care to enlighten? – William Aug 22 '21 at 14:57
  • 2
    @William What I actually wanted to say is that writing $|x|=\pm x$ (that is, $|x|=x \lor |x|=-x$) is logically correct, but of course doesn't tell the whole story (for which $x$ is it $+x$? $-x$?). It's similar to saying that $-2\leq\sin x\leq 2$ for real $x$: this statement is true, but could be made more precise. – Zuy Aug 22 '21 at 16:16
  • 1
    There is no unary predicate in this question. If '=' gets taken as a predicate, it's a binary predicate. So, I don't understand why unary predicates appear in this answers, and it seems doubtful to me that they have any sort of relevance. – Doug Spoonwood Aug 22 '21 at 21:15
3
  1. $T \equiv T \vee F\tag✓$ $$\sin x = 0 \quad\equiv\quad \sin x =0 \;\text{ or }\; \cos x = 0 \tag✘$$

    Statement $(✓)$ correctly exhibits a tautological equivalence. On the other hand, the propositional function (i.e., contains a free variable) $(✘)$ has the form $$Sx\leftrightarrow Sx\lor Cx,$$ so is not a logical validity, so is an incorrect assertion of logical equivalence; it is not even mathematically true, since $$\sin x = 0 \quad\kern.6em\not\kern-.5em\Longleftarrow\quad \sin x =0 \;\text{ or }\; \cos x = 0.$$

    and then get $x \in \{\frac{nπ}{2} : n \in \mathbb{Z}\}$ as the solution, which is absurd.

    Due to the lack of mathematical equivalence, the LHS and RHS of $(✘)$ do not have the same solution set.

Let the domain of discourse be $\mathbb R.$

  1. $$|x| \overset{\text{def}}= \begin{cases}-x &\text{ if }x<0; \\x &\text{ if }x\geq0\end{cases}$$

  2. \begin{align}y=\color\red\pm x &\color{red}{\overset{\,\,\text{def}}\iff} \;y\in\{x,-x\}\\ &\iff\;y=x\:\:\:\text{or}\:\:\:y=-x\end{align}

  3. $$\text{for each }x,\quad|x|=\color{red}{\pm}x\tag A$$ $$y=|x|\kern.9em\not\kern-.8em\iff y=\color{red}{\pm}x\tag B$$ To understand the above inequivalence, put any negative number as $x$ and the same number as $y;$ the left assertion is in fact stronger than the right.

    The apparent discrepancy between statements $(\text A)$ and $(\text B)$ is because the notational shorthand $\color{red}{\pm}x$ is not a genuine mathematical expression, because $\boldsymbol{y=\color{red}{\pm}x}$ is syntactic sugar for a disjunction rather than a genuine equation! A consequence of statement $(\text B)$ is that statement $(\text A)$ is not a mathematical identity; that is, $$\boxed{\;|x|\not\equiv\color{red}{\pm}x\;}.$$ In fact, $$\boxed{\;y=|x|\quad \iff\quad y=\color{red}{\pm}x\:\:\:\textit{and}\:\:\:y\ge0\;}.$$

  4. Compare:

    • $$\begin{align}&\lvert2x\rvert=x-1\\\implies&\color{red}{\pm}2x=x-1\\\iff& x\in\left\{-1,\frac13\right\}\end{align}$$
    • $$\begin{align}&\lvert2x\rvert=x-1\\\iff&\color{red}{\pm}2x=x-1 \;\textit{ and }\; x-1\geq0\\\iff& x\in\emptyset\end{align}$$
    • $$\begin{align}&\lvert2x\rvert=x-1\\\iff&\bigg(x<0 \;\text{ and }-2x=x-1\bigg) \:\text{ or }\: \bigg(x\geq0 \;\text{ and }\; 2x=x-1\bigg)\\\iff&\bigg(x<0 \;\text{ and }\; x=\frac13\bigg) \:\text{ or }\: \bigg(x\geq0 \;\text{ and }\; x=-1\bigg)\\\iff& x\in\emptyset\end{align}$$
ryang
  • 38,879
  • 14
  • 81
  • 179
1

The term $\pm$ (or sometimes $\mp$), like any notation, carries a lot of meaning and connotations, because we see certain notations in certain places. To use $\pm$ is to say that the choice of either plus or minus should make sense, and perhaps depending on further context one is preferred over the other. To say $|x|$ is to unambiguously say that the quantity is positive and equal in absolute value to $x$.

$|x|\neq\pm x$ because the left hand side is a uniquely determined positive value, whereas $\pm$ is an ambiguous statement suggesting both states of plus or minus are valid unless further context to the question says otherwise. If you are doing algebraic manipulation, and you write $\pm x$ instead of $|x|$, you will find yourself in a nightmare of superimposed states, where you must deal with both cases of plus and minus and as such it is an inferior notation to $|x|$. There is neither reason nor motivation to write $|x|$ as $\pm x$, and $|x|$ is always only one value, is always unique; $\pm x$ is not.

You say one can go bonkers with this logic, saying $\sqrt{9}=3\vee -193e^2$. There is a good quote from somewhere, I don't remember exactly where, saying that a good notation frees the mind to focus on the problem at hand. $\sqrt{9}=3\vee -193e^2$ is not a good use of the $\vee$ notation, and is indeed bonkers as you say. I don't think it is so much a logical error but more a semantic error: logical conjunctions like "or" generally signal that either state is possible, and in any further working or proof we must account for all the states. You can chain "or"s and other conjunctions, and the point of doing this is to logically determine one or more solutions to whatever problem you're facing - introducing absurdities serves absolutely no purpose. It is not correct to write $3\vee-193e^2$ because to take mathematical notation to such a highly pedantic level is to undermine the purpose of notation in the first place, and it will trip you up to write like that if you ever write a proof or work on a harder problem, because littering the working with absurdities and ambiguous notation is not how we do maths.

FShrike
  • 40,125
1

The reason $\lvert x \rvert \neq \pm x$ is that the left hand side, $\lvert x \rvert$ is a function, therefore it produces only a single value for a given argument. On the other hand, $\pm x$ is a $set$ of possible values. Single-valued and multivalued maps are fundamentally different kinds of quantities, so equating them is meaningless.

Here's what I mean, graphically. This is a plot of $y= \lvert x \rvert$,

Whereas this is $y = \pm x$,

(Notice how 'or' translates to superimposition of the different possibilities).

  • This is what I had in mind as well. $x$ or $-x$ represents an entire set of redundant solutions whatever it is below the X axis, (just like the example I have given below with sines and cosines). However, what would you say is the logical error in writing $|x| = \pm x$. (You've only focussed on the first part of the question.) – William Aug 22 '21 at 11:08
  • The logical error, I think, would be that $\lvert x \rvert = \pm x$ does not contain enough information to describe the usual piecewise modulus function. Rather, the former equation just puts all the possible outputs into one statement without specifying the finer details, such as what the function looks like in different parts of its domain (which brings us back to the piecewise definition).

    It is simply a matter of lack of information, if one wishes to see the problem that way.

    – Siddhartha Bhattacharjee Aug 23 '21 at 15:11
0

The logical flaw in your thought, is that you thought that $T \equiv T \lor F$ implies that $\forall x [A(x) \equiv A(x) \lor B(x)]$; and this is incorrect. This flaw made you think that the set for solutions of $A(x)$ which is $\{x: A(x)\}$ is the set union of itself with $\{x: B(x)\}$ and of course caused the absurdity you referred to.

The correct implication is:

$(T\equiv T \lor F) \implies \forall x [A(x) \implies (A(x) \iff A(x) \lor B(x))]$

This shows that the set of solutions for $A(x)$ is $\{x:A(x)\}$ because any object substituting $x$ would only be a solution if it satisfies $A(x)$, now if it satisfies $B(x)$ but not satisfy $A(x)$ then we'll have $F \equiv F \lor T$ which is not true and so not a solution, and of course if it neither satisfy $A(x)$ nor $B(x)$ then it is not a solution. Of course if $x$ satisfies $A(x)$ then we get $T \equiv T \lor F$ always, so it is always a solution despite whether $B(x)$ is true or not. So logically speaking we have the set of solutions equal to $$\{x: A(x)\} \cap \{x: B(x)\} \cup \{x:A(x)\}$$ which is $\{x:A(x)\}$ itself.

I think this is the answer to your logical question which is basically Zuy's answer.

However, your question is also interesting in another sense, that of proper symbolism of relations and functions. And although this was not your question, but its related to it in some sense. To answer that aspect I'd say that everything depends on how do we define the expressions we write. For instance $F(X)= \pm Y$ is a doubious expression, it's confusing, because generally the expression $F(X)=Y$ is reserved for when $F$ is a one place function symbol, so it assigns ONE value $Y$ to each argument $X$, while $\pm Y$ is usually taken to denote two distinct values that are $+Y$ and $-Y$, so this will supply the impression that the expression $F(X)= \pm Y$ means that $F$ is some relation symbol that sends $X$ to $+Y$ and also sends $X$ to $-Y$, i.e. a One-to-Many relation, but this is confusing because of the use of $=$ which entails that $F$ must be a function. To properly write matters in a logical language one must first see how to write formulas using $\sf One-to-Many$ relation symbols, one better avoid using the equality $=$ symbol, so we better write $F(X,Y)$, so doing that we can for example define:

$ F(X, \pm Y) \iff [F(X,+Y) \land F(X,-Y)]$

So for example if we intend to use the symbol $\sqrt \ $ to designate the converse relation of the square function, then we better write it this way:

$\sqrt \ \ {}(X, \pm Y) \iff [(+Y)^2=X \land (-Y)^2=X] $

However, we can abuse notation and insert the equality symbol and define:

$\sqrt x = \pm y \iff [(+y)^2=x \land (-y)^2=x] $

Which is a wrong way of writting matters because logically it would be read as $\sqrt x = + y \land \sqrt x = -y$ and this clearly leads to $+y = -y$ by identity theory, which is contradictory! But unfortunately this is the intended meaning many times.

Now if we intended for example for the square rooting to be a function, so we can fix one value to each argument, like by arranging it to be the positive value only, so this way $\sqrt 9 =3 \land \sqrt 9 \neq -3$, but if we stick to this interpretation, then $\sqrt 9 = \pm 3$ is a FALSE statement!.

The OP is under the impression that $F(X) = \pm Y$ is a disjunctive expression, to mean that $F(X)=+Y \lor F(X)= - Y$, and this is a wrong capture, the reason is because it would lead to the explosion he is alluding to, so I can for example write $\sqrt 9= \pm 3; 8^2 = \pm 64 , 6/2 = \pm 3, 1+3=\pm 4, |3|=\pm 3,...$ and all would indeed be logically valid under that interpretation, and clearly this is a redundant symbolism, and so it is not the correct capture of what's going on. Yet, if you insist on interpreting it this way, then there is no logical flaw with it, as long as one of the values is true, then you can add as much other values you want and the result remains logically valid, but the possible expressions under that interpretation would of course be REDUNDANT. So you can abuse $T \equiv T \lor F$ as much as you want, there is no logical flaw about it, but when you use this to define expressions, then you'ed expect an explosion of redundant expressions. [Be aware that this abuse must not lead you to the logical flaw about the set of solutions that was pointed out in the begining of this answer]

The reality of the matter is that $F(X)= \pm Y$ is an incorrect symbolism, it is an abuse of notation, and should be just taken in an informal sense to mean that $F(X,+Y)$ is true and $F(X,-Y)$ is true also. The proper way of writing it is as $F(X, \pm Y)$, and the proper definition of it was given above.

Zuhair
  • 4,555
-1

You are right to state that symbols do not have meaning by themselves without context. When we write $\sqrt{9}=\pm 3$, what we are saying is all this: the equation $x^2-9=0$ has exactly two solutions $x=3$ and $x=-3$. So I would say that it is not exactly that $x=3$ or $x=-3$, that will depend on how $x$ is defined or computed elsewhere.

This is a different usage to writing $|x|=\pm x$ meaning $x$ or $-x$. In fact, I do think you could use it (even incorrect) to consider both possibilities in a single equation, for instance if the sign does not change the final result, e.g. $|x|^2=(\pm x)^2=x^2$. It does not seem very recommendable but I think everyone would understand it. Note that in this case the possibilities are either $x$ or $-x$ but not anything else, so it is not exactly a logical OR, just a shorthand for two equations.

Miguel
  • 3,265
  • 4
    I think you have missed the point. As the OP knows, $\sqrt 9$ is equal to $+3$; the OP's question is more along the lines of "Is it correct to write $1=\pm 1$, because $1$ is equal to one of the two alternatives $+1$ and $-1$?" – TonyK Aug 22 '21 at 10:57
  • @TonyK Yes, thank you. – William Aug 22 '21 at 11:03
-1

What I think is being understood is the difference between a set and a statement with a truth value. Let me try and explain.

We'll take OP's example of $\sin x=0$ and run with it. What $\sin x=0$ actually tells us is the set of all values of $x$ (in a given domain) such that the statement holds. It has no inherent truth value, it's just a set (of solutions). But, once a $x$ is given, the statement $(\text{For the given }x,\ \sin x=0)$ indeed has a truth value. And here we see what the OP has a confusion in. OP's statement $$(\sin x=0)\equiv (\sin x=0\ \lor \cos x=0)$$ is trying to establish an equivalence between sets, and the logical or is actually just union, and the OP clearly establishes that this equivalence is not true. But what is true is that the following statements can be compared as logical statements : Given an $x$ whether:

$$(\text{For the given }x,\ \sin x=0)\equiv (\text{For the given }x,(\ \sin x=0\ \lor\cos x=0))$$

(Thanks to Hans Lundmark for telling me that I wrote something wrong. I was thinking something else, and wrote something else haha)

Edit : Let me actually add another clarification to a problem OP mentioned in the question, and we'll see how both of them connects.

It has to do with the fact that OP writes $\sqrt 9=3\ \lor -3\ \lor -139e^2$. From a logical point of view, this is absolutely correct, because it's really 3 statements written together :

$$(\sqrt 9=3)\ \lor (\sqrt 9=-3)\ \lor (\sqrt 3=-139e^2)$$

and the first 2 statements are indeed true and hence makes the whole statement true. Being ruthless, we can literally add everything and say $$(\sqrt 9=3)\ \lor (\sqrt 9=-3)\ \lor (\sqrt 9=x,\ x\in\mathbb R\setminus\{3,-3\})$$ This statement is completely true because the first two components are true. This is a problem with "finding the correct solution given a set of statements connected by logical or". Because, if only 1 component is true, the whole statement becomes true, but that means there could be false components hidden in the statement.

An example where this happens is when we find solutions by squaring. Extraneous solutions creep in which doesn't solve the original equation, but the whole solution set as considered in the above fashion is indeed correct (try squaring both sides of $x^2=9$ and see that one has 2 extraneous solutions which doesn't solve this). Hence we are asked to check if indeed everything in the solution set is true, or there's imposters lurking in it (in our case, it would be everything that is not 3 or -3).

tl;dr : The statement OP wrote about $\sqrt 9$ is logically true, but since these are statements connected by logical or, one needs to check which of the solutions are actual solutions and which are not (because throwing in one solution makes the whole statement true).

In the case of the trigonometric statements, we again have 2 statements connected by logical or, and hence one needs to check which component is true and which is not for particular values of $x$.

Hope this helps in seeing where the problem lies, and the OP can transfer the arguments for the other cases as well.

  • I think you're the first person here who has actually tried to understand my question and form an answer around that. This answer is very helpful actually. I'll need some time to think about it and then I'll respond. Thank you. – William Aug 22 '21 at 11:43
  • Glad to be helpful! Just let me know if you need any clarification. – Yuzuriha Inori Aug 22 '21 at 11:44
  • 1
    But what if the given $x$ is $x=\pi/2$? Dont you get F on the left and T on the right then? – Hans Lundmark Aug 22 '21 at 11:47
  • " (For the given x, sinx=0) indeed has a truth value" I don't get this, to my understanding, it is not the goal of propositional logic to actually check if statement is valid or not, so why does the requirement of set of values exist? Even a non sense statement could possibly be given true or false value to my understanding – tryst with freedom Aug 22 '21 at 11:49
  • @HansLundmark Thank you for letting me know that I completely missed part of the statement I wanted to write :) – Yuzuriha Inori Aug 22 '21 at 12:12
  • @Buraian I think that's not what was meant here. (For given $x$, $\sin x = 0$) has a truth value means if $x= π/2$, the statement ($x = π/2, \sin x =0$) is false. For say, $x=0$, it'd be true. For any $x$, the statement has a truth value. Either $T$ or $F$. – William Aug 22 '21 at 12:28
  • 1
    @YuzurihaInori: Thank you for elevating me to the status of Landmark. :-) But I'm not sure I understand what you are trying to say with the edited statement either... – Hans Lundmark Aug 22 '21 at 12:47
  • What I meant to say was that if you are given an x, then the logical or can indeed be treated as intended, and the statements on both sides of the equivalence symbol compared. – Yuzuriha Inori Aug 22 '21 at 12:51
  • 1
    Oh man I laughed too much at your comment @HansLundmark – tryst with freedom Aug 22 '21 at 12:52
-2

$|x|$ has one definite value for a given $x$. $\pm x$ has two values for a given $x$ (except when $x = 0$). Because of this, it's not clear what $|x| = \pm x$ should mean.

In mathematics, we define something called the pre-image of a function. Given a function $f : \mathbb{R} \to \mathbb{R}$ and a subset $A \subset \mathbb{R}$, we define $$ f^{-1}(A) = \{x \in \mathbb{R} : f(x) \in A\} $$ With this definition in hand, we can give some precise meaning to $|x| = \pm x$. Let $g(x) = |x|$. Then $$ g^{-1}(\{x\}) = \{c \in \mathbb{R} : g(c)= x\} = \{x, -x\} $$ If we think of $\pm x$ as the set $\{x, -x\}$, then we may (though no mathematician would) write $g^{-1}(x) = \pm x$.