Answer
I'm not entirely satisfied with any answers here, and I think I understand what you're asking. First, understand from semiotics the triangle of reference. Essentially, you have the notion of the 'symbol' and the 'referent'. For instance in the statement x=3, The x by convention is the symbol and 3 is the value to which the symbol refers. Yes, technically in one sense, they are both symbols (the term grapheme is used in linguistics), but by convention letters are used to indicate the use of a grapheme that will reference other graphemes. (The ancient Greeks used letters for numbers, so that wasn't really possible as a convention.) In fact, the letters x and n are used so frequently, they've become a shorthand for the notion of a variable itself.
Now, why use a letter to indicate a quantity? Well, simply put, in mathematics and logic, we often don't know what value we are discussing. In this usage, x is called an unknown. This is an important distinction because in common mathematical usage, a lot of people call unknowns variables, which isn't technically true. An unknown is a quantity that we do not know, and it can be represented by anything. A letter is just a convenient fiction, a place holder; it would be confusing to use digits to represent unknowns, because we use digits for known values. Digits name values. But, here is an important point. An unknown might not vary. It might be a constant. So, letters which represent unknowns are sometimes constants. And when we discover the values, they are known constant values even if they are represented by a letter. One example is the letter e as in 'e the mathematical constant'.
Another example is given the statement 2x+1=5, at the start of the problem 'find the value x', x is an unknown. x IS NOT A VARIABLE! (But many people call it that erroneously thought 'the value' literally means one, constant, not changing quantity.) But following through on the steps, we find x=2. Now x is a known. And despite the fact that we used the letter x, at no point was x variable! But then, in the next math problem, a math teacher may write the function f(x)=x^2 and tell you the domain is all reals. Now x is a variable and with assignment, is always known! Then in a third problem, It might be stated f(x,y)=xy find the partial derivative with respect to x, and then with y, which in calculus means, with the same equation, first hold one of the letters constant, than the other! And in the notation, none of this is indicated because one just has a letter.
There are some ways to deal with this. For instance, consider the ordered pair (x,y). Is this a point? a line? a plane? Well, it's ambiguous notation since a point would require both to be constant, a line for one to vary, and a plane for both to vary over a domain of discourse. But we can use some logic notation to clarify:
(x,y) ∃!x,y∈ℝ read as 'the ordered pair x,y there is a unique (constant) x and y in the reals.
(x,y) ∀x,∃!y∈ℝ read as 'the ordered pair x,y for all x reals (the variable x) there is a unique (constant) y.
(x,y) ∀x,y∈ℝ read as 'the ordered pair x,y for all x and y in the reals (x and y are both variables).
The first is the definition of a point where (2,4) qualifies as 2 and 4 are constant in the expression. The second is a horizontal line (x,4) through {(1,4),(2,4)} usually just written as y=4. And the last has two variables so it would be defined by the plane determined by (x,4) ∩ (3,y) since there is a point (x,y) for any two real values assigned to x and y.
So to keep things straight, letters may be constant or variable, known or unknown, and generally mathematicians and logicians either tangentially mention or don't explicitly state it at all presuming from context you understand (because they understand, and if they understand, then everyone should understand)!
There's nothing magical about this; it's just that it's not convention to indicate the two dimensions of a variable in the symbolic notation. Sometimes when I teach, I put a small dot under a letter to indicate it's an unknown constant. For instance, if I were to write ax + b, I'd put a dot below both a and b to make it clear that we vary x, and not the constant terms of the polynomial, but most practitioners don't go out of their way. They presume you infer that the difference between {a,b,c} and {x,y,z} is that the former are used as constants and the latter are used as variables. Another common convention is to use k as in the equation F(x)=-kx which is an equation that describes the force of a spring. Here, k is a constant of proportionality.
The real take away is that many people call x a variable when they mean unknown or constant instead. They see the letter, say it's a variable, and give no thought to the context. Does x vary in the problem? Yes? It's a variable. If it doesn't, then it's not. But when you call all xs variables and then look at a problem where it is a constant, you are sure to get confused.
If you're really interested variables and reference, some additional articles you might read are "Sense and reference, "Type system", and "Anaphora". The first is the philosophical investigation of reference outside of semiotics, the second is understanding what computer compilers and interpreters model to allow for translation of programming instructions, and the last is the linguistics take on context and reference.
EDIT
can we have a statement 2x-5 be neither true nor false and have 'x' as a variable that provides either 'true' or 'false' for different value of x? (as in predicates)
The difference between 2x-5 and 2x-5<7 or in logic, p^q and p^q≡T is that both have variables, but the former are expressions, the latter statements. Expressions cannot be true or false because they don't predicate. You can think of all statements that are truth-conditional as implying predication. For instance, Statement s is true such that s is '2+2=4'. True! Statement s is true such that s is 'T^F≡T'. False! Statement s is true such that s is 'p^q Unknown! Depends!
It is usually statement that gives the nature of the grapheme context. 2x-5, x is unknown, and we don't know if it's a constant or a variable because there's no context. 2x-5<7, x is a variable such that x is any number less than 6. π is a constant in an expression or a statement by definition. 2x-5<7 : x=100 is a statement with no unknown, because x is defined as a constant. In this sense, it's a placeholder for a value, not truly a variable.
we can still have sentences like 2x+5=15 without x being 'unknown' or 'constant' as long as we know the truth value of the statement can vary
We use a letter as a placeholder, as where it is known. E.g., 2x+5=15:x=5. Here, x is known and is constant. E.g., 2x+5<15:x=5 Here, x is known and is constant. An expression with unknowns has no truth value and an indeterminate mathematical value. An expression with all knowns has no truth value and a determinate mathematical value. E.g., 2x+5. Is x a constant or variable? No context. Who knows! but 2*3 +5, while not true or false is clearly equivalent to 11. In the case of the statement 2x+5>y, the truth value is indeterminate, and the nature of the two unknowns is unknown. If you were to see 2x+5>k, you might suspect that k is a constant and x is a variable, but context would have to confirm.
Be careful here. 2x+5=15 has two unknowns at play, one explicit as x in which case if we can solve x and find a single variable the unknown is a constant. The other is the truth value of the statement itself! Until x is known, we cannot confirm or deny the veracity of the sentence. After solution, x=5 shows us are unknown is now a known constant. But we also have the implicit unknown of the truth value of the statement Is the statement s true such that s is '2x+5=15' when 'x=5'? Yes! That is s≡T. So every math statement might contain math unknowns, and the veracity of the statement if represented by 'p' might be a logical unknown. We almost never write out the logical names of statements in mathematics, except in mathematical logic, like in model theory where we are primarily interested in the various truth values of a collection of statements.
(one last thing), you've quantified over y there, is that because y is a variable from a (Logical) point of view but a 'parameter' in the context of a line or plane? (In logic the only thing which is a constant is literally a name that refers to a number all the time like a =5 )
Parameters and arguments, at least in computer science are another word for variables and values assigned to it. One can write a function
String strOutputToConsole; System.out.println( strOutputToConsole ); and strOutputToConsole is a variable. We can assign any string we want to it. The moment we write strOutputToConsole = "Hello, world!"; then "Hello, world!" becomes the parameter. You can think the same way in mathematical functional notation, though I haven't heard it spoken as such. Given y=f(x), let x be 6would makexthe variable and 6 the parameter. 'Qualification and quantification over' defines the nature of a binding of a symbol to a referent.Let s be all statements regarding colorsays, that whateversis, it is a statement that has to invoke the concept of color. 'I'm happy' is not ins. Lastly, [existential quantification][12] makes a claim about the existence of something and is evaluated under truth-conditional semantics. One doesn't even have to use the symbol. There exists something that contains something else.` Here, 'something' and 'something else' as an unknowns, and simply says that 'It is true that 'something' and 'something else' exist, and they have this relationship of containment'.