# Replaceability of variables in a formula

So I recently figured out how to find an area of a triangle by given it's three side length. This is the formula:

$$A=\frac{\sqrt{4(ca)^2-(c^2+a^2-b^2)^2}}{4}$$

And it's seems like that you could replace the variables with each other and the formula still works. Such as below:

$$A=\frac{\sqrt{4(ab)^2-(a^2+b^2-c^2)^2}}{4}$$ $$A=\frac{\sqrt{4(bc)^2-(b^2+c^2-a^2)^2}}{4}$$

And I guess this is probably because it doesn't matter where you put the variable. The variable are arbitrarily chosen, and what matters is how every triangle's sides relates with each other.

The same thing happens to a formula that find the surface area of a box: $$S=2ab+2bc+2ac$$ $$S=2(ab+bc+ac)$$  $$S=2(a(b+c)+bc)$$ $$S=2(b(a+c)+ac)$$ $$S=2(c(a+b)+ab)$$

And I get how this sort of pattern appears, but I can't describe and generalize it thoroughly that it makes sense to me.

So what do you call this 'behavior' in math? The replaceabilty of a variable in formula that doesn't change the outcome?

Sorry if I use weird terminology. My prior math education is middle school math, I'm just a curious kid.

Assuming you are not familiar with the definition of a function, I will try to put it as easily as I can without missing out on any essence.

A function is kind of a blackbox where you can only put in things of a certain kind and the value(s) of the things you put into the blackbox determine a particular value that the blackbox spits out to you, and if you put in the same values time and again (into the blackbox), then you will get the same output-value back everytime.

For example, $$A(a,b,c)=\sqrt{\left(\dfrac{a+b-c}2\right)\left(\dfrac{b+c-a}2\right)\left(\dfrac{c+a-b}2\right)}$$ is the area function where $$a,b,c$$ are the side lengths of a triangle (so they automatically satisfy the triangle inequality, besides being positive, that is, the triplet - ($$a,b,c$$) is a thing of a certain kind satisfying certain properties, in this case, the property of being the sides of a triangle on a plane)

Now, for simplicity let's consider a less complicated function, say $$f(x,y,z)=x^2+y^2+z^2+xy+yz \ \cdots (1)$$ It is worth taking note that if you interchange the symbols $$y,z$$ in both LHS and RHS of $$(1)$$ above, it stands $$f(x,z,y)=x^2+z^2+y^2+xz+zy \ \cdots (2)$$

Note that $$(1)$$ and $$(2)$$ are not the same as $$(1)$$ contains the term $$xy$$ and $$(2)$$ doesn't, while $$(2)$$ contains the term $$xz$$ which $$(1)$$ doesn't.

However, this handicap is not present in the area function $$A(a,b,c)$$, particularly because as you found out, $$A(a,b,c)=A(a,c,b)=A(b,a,c)=A(b,c,a)=A(c,a,b)=A(c,b,a) \cdots (*)$$ i.e. however you interchange the positions of the symbols in the expression for the function, it's value does not change. This is expressed by saying that $$\textit{The function } A(a,b,c) \textit{ is symmetric in the variables } a,b,c$$

Why is it useful to have a terminology for this?

When you want to prove inequalities like the following:

If $$a,b,c$$ are positive real numbers, then prove that $$\dfrac{a}{b+c}+\dfrac{b}{c+a}+\dfrac{c}{a+b}\ge \dfrac32$$

where, if you bring all the terms containing the variables [$$a,b,c$$ in this case] to one side, (here they are already on one side, the LHS), you get a symmetric function in $$a,b,c$$ as the one in this inequality, and if you have a symmetric function in $$a,b,c$$ you can always assume an arbitrary ordering without any loss of generality (WLOG) $$\mathbf{a} \ge \mathbf{b} \ge \mathbf{c}$$ (this is precisely because a property like $$(*)$$ holds and for any of the possible arrangements of $$a,b,c$$ from left to right, the function is the same)
which makes it easier to apply well-known inequalities like the Rearrangement Inequality, Chebyshev's Inequality, Karamata's Inequality which consider ordering of variables in their statements.

There is a not-so-remote cousin of symmetric functions known as cyclic functions, which are a bit more restricted than symmetric functions. Consider for example $$g(x,y,z)=\dfrac{x}{1+2y} + \dfrac{y}{1+2z} + \dfrac{z}{1+2x}$$ and note that $$g(x,y,z)=g(z,x,y)=g(y,z,x)$$ but none of these $$3$$ are equal to $$g(x,z,y)$$ (which is again equal to $$g(y,x,z)$$ and $$g(z,y,x)$$).
The name cyclic is given to such functions, very intuitively, because the function stays same for $$x,y,z\\z,x,y\\y,z,x$$ where one arrangement can be obtained from the other by moving the last element to the beginning of the sequence in a cyclical manner.

Symmetric functions are cyclic but cyclic functions are not necessarily symmetric.

If you encounter functions like $$g(x,y,z)$$ which are cyclic but not symmetric in an inequality problem like the one I mentioned before, and you need to make a simplifying assumption: If a function is cyclic in its variables, you can assume one of the variables to be the maximum among those, or one of the variables to be minimum among those WLOG, i.e. in the example of $$g(x,y,z)$$, since it is cyclic and not symmetric, you can assume that $$(x\ge y, \ x\ge z)$$, i.e. $$x$$ is the largest among the $$3$$ variables $$x,y,z$$ but not $$(x\ge y \ge z)$$, that is, you can assume that $$x$$ is the largest WLOG, but cannot assume further about the magnitude of $$y$$ and $$z$$ without going into cases. [This is kind of because $$g(x,y,z)\ne g(x,z,y)$$]

• Thank you for explaining it to me in that I could understand it. This has expose me to a new kind of math. :) – Sometimesomewhere Jun 30 at 4:14
• @Sometimesomewhere in school, particularly if you "hate school" ;) and love math, olympiad math is extremely freeing to explore and participate in. – Fawkes4494d3 Jun 30 at 8:19