# How does variable ordering in expressions work when creating functions from an equation?

I'm having a really hard time understanding some aspects of functions, i've tried looking around on Khan academy and haven't quite found something to answer my question, i'm sure i'm overlooking something stupid but wanted to know.

So let's say i have the following problem:
For a given input value 'n' the function 'g' outputs a value 'm' to satisfy the following equation:

$3m - 5n = 11$
g(n) expresses m as a function of n:

My step by step is as follows:

$3m-5n=11$ From what i gather, the objective is to isolate the m.
To do so, i subtract $5n$ from the left side, and add $5n$ to the right side
$3m = 11 + 5n$
Then, we want to simplify the equation to use only 1 m, not 3, so we divide everything by 3.
$m= \frac{11}{3} + \frac{5}{3}n$

However, from what khan academy says, this is wrong because the proper way to express this is
$m= \frac{5}{3}n + \frac{11}{3}$

My question is, how do you determine where the variables you balance out from whichever side go on the opposite side? I was told in layman's terms the idea was to have the "dynamic" variables come before the "constant" variables, which i've tried, and sometimes i find it's just the opposite, and the "correct" answer is with the dynamic numbers before the constant ones!

What am i missing here?

Thanks.

TLDR: It is personal preference and largely doesn't matter

Notice that $\frac{11}{3}+\frac{5}{3}n = \frac{5}{3}n+\frac{11}{3}$ due to the commutativity of addition. These two answers are not fundamentally different.

What order you write things in is largely personal preference, and can change depending on context.

One of the most common ordering of terms in a polynomial (referred to as monomial ordering) used is lexicographic ordering which follows the following rules:

• Given that $x_1\succ x_2\succ x_3\succ\dots$, comparing a term $ax_1^{\alpha_1}x_2^{\alpha_2}x_3^{\alpha_3}\cdots$ to $bx_1^{\beta_1}x_2^{\beta_2}x_3^{\beta_3}\cdots$ the term to be written first is determined by comparing powers of $x_1$. Whichever has the higher power of $x_1$ should be written first. If equal then compare powers of $x_2$ and so on until a decision can be made.

This is the same as you should be familiar with as "dictionary order" how you see aardvark in the dictionary before appetizer before apple

For example, something written with lexicographic ordering:

$$x^5+3x^2y^7+3x^2y^5z+x^2y^5+y^{20}+5$$

In such an ordering scheme, the constants would come at the end.

This is not the only choice however. Graded lexicographic order before concerning yourself with the lexicographic order, you first prioritize ordering the terms based on total degree. The above would instead have been written as:

$$y^{20}+3x^2y^7+3x^2y^5z+x^2y^5+x^5+5$$

There are many other orderings that are in use as well, but those are the ones I see most often.

In yet different contexts, it might not be feasible to write larger powers on the left as there may be too many to do so. Take for example:

$$e^x=1+x+\frac{x^2}{2}+\frac{x^3}{3!}+\frac{x^4}{4!}+\frac{x^5}{5!}+\dots+\frac{x^n}{n!}+\dots$$

In this case, you will often see the constant term on the far left as opposed to the far right.

In the end, do whatever feels right to you. If you try to be consistent, great, but it should not truly matter and ordering terms is largely done simply to try to organize the visual information in a useful way. If the equation can be read without any problem, then it is written fine however it is. There isn't much of a mathematical difference between competing ways of writing polynomials, only a visual one.

• If it's just personal preference and my answer is still correct then why would khan academy say it's wrong? May 23, 2016 at 1:29
• @zack6849 Poorly coded homework submission software will search for a specific way or ways of writing an answer. Essentially running a "is inputstring*=*answer" check. Better software will check to see that the answer submitted is mathematically equivalent to what it expects and is more lenient with formatting. If there is a professor moderating the class/homework and you lose points for submissions simply because the system did not like the way that you formatted it, then you should be able to email him/her and request score modification. May 23, 2016 at 1:34
• @zack6849 if the homework were submitted and written and checked by hand, there is no question in my mind that the two answers are the same and would receive the same credit. If you are experiencing difficulty with the specific software checking your answers online, then complain to the company who wrote the software and be ready for several headaches down the road. May 23, 2016 at 1:36
• Alright, this really threw me off because 90% of the time khan academy does check for things that that, thank you for your advice and assistance! May 23, 2016 at 1:36