Author Topic: A little bit of a maths problem with indices  (Read 7214 times)

0 Members and 1 Guest are viewing this topic.

Offline IanB

  • Super Contributor
  • ***
  • Posts: 9639
  • Country: us
Re: A little bit of a maths problem with indices
« Reply #25 on: December 29, 2014, 11:50:33 pm »
Yes we have been over it twice already although some of us still struggle with the concepts.
OK, but it's really important to grasp that -2 is a complete whole number to itself, it is not "-" and "2" as if somehow they could be separated. Sometimes -2 might be written as -2 to reinforce this.
I'm not an EE--what am I doing here?
 

Offline electr_peter

  • Supporter
  • ****
  • Posts: 936
  • Country: lt
Re: A little bit of a maths problem with indices
« Reply #26 on: December 29, 2014, 11:50:47 pm »
Please show a clear case where this is the issue. You do it by the rules, result should be the same. Also, those two meanings are almost identical in practice.
You mean other than the entire premise on which this thread is based?

-2^2
...
I can understand why is it somewhat ambiguous with +/- final result. As I said, correctly defined rules solves this problem without any ambiguity (in theory)

However, in practice you want to have final result correct while intermediate steps are being done by person/compiler/... who can interpret the logical operations in it's own way. This leads you only one option - strictly adhere to the rules and at all costs avoid any possibility for interpretation by using parenthesis.

That is, rewrite equation/formula in more easily understable way.
-2^2 could become x=2; -x^2 or extreme case obvious for anyone and anything (-((2)^(2))). I would argue that later case is hardly comprehensible for humans with more numbers and functions, but gets job done in programs/compilers.
It is not nice practical solution for operation priority problem "If you know the rules and everybody plays by the rules, then all is OK. If either condition is broken ..."
« Last Edit: December 29, 2014, 11:52:21 pm by electr_peter »
 

Offline Neganur

  • Supporter
  • ****
  • Posts: 1114
  • Country: fi
Re: A little bit of a maths problem with indices
« Reply #27 on: December 30, 2014, 12:27:29 am »
Hmm, I read the whole thing again and I'm pretty sure you (Simon) had the position that you want to put a parenthesis around the numbers you substitute for a variable. I agreed. (yes! 7)

What I was commenting was that someone started arguing that this is only the case "when '-' means the mathematical operation 'minus'", which is utter nonsense. Minus is always minus.
This happens when variables are confused with values. Expressions with variables is fine and substituting without parenthesis is bad style.

-x^2 cannot be misinterpreted (by mathematicians). There is no, "but the '-' here means that x has a negative sign!". The value of the variable x did not change (you may not even know the value).
Or let me ask very provokingly, do you claim that "-x" is a negative number :)

Regarding compilers and programs, I don't know how the compiler does math but I assume it adheres to operator precedence. Anything else would be terrible!
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1455
  • Country: us
Re: A little bit of a maths problem with indices
« Reply #28 on: December 30, 2014, 04:04:22 am »
What I was commenting was that someone started arguing that this is only the case "when '-' means the mathematical operation 'minus'", which is utter nonsense. Minus is always minus.

I was merely trying to draw a distinction between the "-" symbol when used to denote a negative number, versus the "-" symbol when used to denote a subtraction operation.  The two are similar, but not the same.

The former is part of the number, and is not subject to order of operations (PEMDAS), the latter is a mathematical operation that is subject to PEMDAS.

-1^2 can be interpreted both ways.  Either "negative one, squared", or if you follow PEMDAS, -(1^2).  This is where the ambiguity stems from.  Does the "-" mean "negative one", or is it a simple mathematical operation that should be applied after the exponent.  Most compilers would follow the latter, while most human-written equations would imply the former.  As you said, this kind of syntax should be avoided at all costs, use parenthesis and it's not a problem.

And yes, every time you do a variable substitution, stick parenthesis around it to avoid any confusion.  Eg:

Code: [Select]
{x^2 -3xy^3 +2z^2} / {x(y^2 -z)}

x=-1
y=-2
z=1
would become
Code: [Select]
{(-1)^2 - 3(-1)(-2)^3 + 2(1)^2} / {(-1)[(-2)^2 - (1)]}
« Last Edit: December 30, 2014, 04:09:46 am by suicidaleggroll »
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7805
  • Country: us
  • adieu
Re: A little bit of a maths problem with indices
« Reply #29 on: December 30, 2014, 04:14:56 am »
-1^2 can be interpreted both ways.  Either "negative one, squared", or if you follow PEMDAS, -(1^2).  This is where the ambiguity stems from.  Does the "-" mean "negative one", or is it a simple mathematical operation that should be applied after the exponent.  Most compilers would follow the latter, while most human-written equations would imply the former.  As you said, this kind of syntax should be avoided at all costs, use parenthesis and it's not a problem.

Through all of my education so far, including part of a math degree, I always learned that -1^2 = -(1^2) because a prefix of "-" is equivalent to multiplication by negative one: it sits in the same place as multiplication in the order of operations. It's frowned upon to write that in places where one is trying to be as clear as possible, but I've never met anybody who knows what he's talking about, who doesn't know that -1^2 = -(1^2).
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Neganur

  • Supporter
  • ****
  • Posts: 1114
  • Country: fi
Re: A little bit of a maths problem with indices
« Reply #30 on: December 30, 2014, 04:33:10 am »
-1^2 can be interpreted both ways.

It cannot possibly be interpreted wrong. You either follow rules of arithmetic or you admit that your expression it is mis-spelled and needs parenthesis because you claim that the minus is a sign, and want it to be stronger than the exponentiation. You cannot use the sign of a number this way. As I said, it is bad style.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5549
  • Country: us
Re: A little bit of a maths problem with indices
« Reply #31 on: December 30, 2014, 04:37:56 am »
If someone has any of the following programming languages, just test it and I'm pretty sure it will do the exponentiation first and then multiply by negative 1

Algol, Commodore BASIC, BASIC, J, MATLAB, R, Microsoft Excel, TeX, TI-BASIC, bc, Lua, ASP and most computer algebra systems D, Ada, Bash, COBOL, CoffeeScript, Fortran, FoxPro, Gnuplot, OCaml, F#, Perl, PHP, PL/I, Python, Rexx, Ruby, SAS, Seed7, Tcl, ABAP, Mercury, Haskell, Turing, VHDL.

Source: http://en.wikipedia.org/wiki/Exponentiation#In_programming_languages

The rest of the languages will use a function so you can't write it like that so it doesn't matter.

The exponent operator for all those languages varies:^, ^^, ** and up-arrow which I don't have on my keyboard.

Edit: Python
Code: [Select]
Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> print -1**2
-1
>>>
« Last Edit: December 30, 2014, 04:44:49 am by miguelvp »
 

Offline Christopher

  • Frequent Contributor
  • **
  • Posts: 429
  • Country: gb
Re: A little bit of a maths problem with indices
« Reply #32 on: December 30, 2014, 06:44:17 am »
Simon I occasionally forgot math laws when studying for my HNC/D. have a look at this, it helped me as it's a quick reference


Math cheat sheet - by Dr Seiden
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14491
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: A little bit of a maths problem with indices
« Reply #33 on: December 30, 2014, 09:41:37 am »
Well at the moment it is the mass that I am studying, hopefully once I am through this maths module I can get on with the good old electronics HNC without having to be too pedantic about the maths. Because I am a clever cookie sometimes I realised that this particular exercise was designed to see if I had understood how to substitute a number into an expression and yes the order of precedence of the operations.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 9639
  • Country: us
Re: A little bit of a maths problem with indices
« Reply #34 on: December 30, 2014, 09:56:16 am »
You can investigate this with your calculator. Enter -2 onto the display and then press the x2 button. Do you get 4 or -4 as the result?

(Also take note of  how you enter -2. I.e. you don't press "-" and then "2", rather you press "2" first and then press the "+/-" key. This illustrates how the sign belongs to the number and is not a subtraction operation.)
I'm not an EE--what am I doing here?
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1455
  • Country: us
Re: A little bit of a maths problem with indices
« Reply #35 on: December 30, 2014, 02:23:19 pm »
You can investigate this with your calculator. Enter -2 onto the display and then press the x2 button. Do you get 4 or -4 as the result?

(Also take note of  how you enter -2. I.e. you don't press "-" and then "2", rather you press "2" first and then press the "+/-" key. This illustrates how the sign belongs to the number and is not a subtraction operation.)

Exactly.  It's just one of those subtle differences between how humans write equations and how those equations as written would be interpreted by a compiler.  Calculators have separate + (add), - (subtract), and +/- (positive/negative) buttons for this reason.  Programming languages/compilers don't, so you need parenthesis to specify.

Another example is division.  When humans write equations, there are multiple signs for division.
Code: [Select]
  4
  --
  5
-----
  6
is different than
Code: [Select]
  4
-----
  5
  --
  6

Compilers don't have "big" and "little" division signs.  If you type "4/5/6" into a computer program, it's going to do the former, you need parenthesis to specify the latter, even though no parenthesis are necessary and they look very similar when written on paper.

90% of the time if I see an equation start with a minus sign in a program, it either doesn't make a difference (eg: -2+3), or it's a typo (eg: -2^2).  Unfortunately you have to go back to the original equation from whatever paper/publication/derivation it came from to verify.  I also cringe whenever I see "4/5/6".  Most of the time it's written correctly, but a significant portion of the time it's a mistake in transcribing the equation and needs parenthesis.

If you just follow PEMDAS verbatim like a robot, you're going to make a terrible code debugger.  You have to recognize the nuances in human writing, including math equations, and notice when an equation, as written, could be a mistake that would give the wrong result from a compiler.  It's also not enough to make sure the compiler does what you want, you need to make sure that future debuggers and developers know that's what you meant to do as well.  The "subtract" versus "negative" meanings of the "-" symbol is just one of these nuances.
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1455
  • Country: us
Re: A little bit of a maths problem with indices
« Reply #36 on: December 30, 2014, 03:00:05 pm »
It cannot possibly be interpreted wrong. You either follow rules of arithmetic or you admit that your expression it is mis-spelled and needs parenthesis because you claim that the minus is a sign, and want it to be stronger than the exponentiation. You cannot use the sign of a number this way.

Where is this coming from?  You seem to have done a complete 180 since posting this just a few hours before (with which I agree completely):
-1^2 is terrible style, avoid it at all cost. You can spend all day arguing with someone about if it is -(1^2) or (-1)^2 because both have a strong case.

In university math and engineering it is strongly advised to use parenthesis, since the goal is to minimize errors and to communicate proof. It can be assumed that 9 out of 10 times (-1) is what was meant and the author was just lazy, this is very common.

All I've been saying, from the start, is that "-1^2" (or if you prefer, "-12") is ambiguous and should be avoided.  As a hand-written equation, chances are it means "(-1)^2", in computer code it will be interpreted as "-(1^2)".  That's the definition of ambiguity.  I'm amazed at the number of people saying it's not ambiguous at all and couldn't possibly be interpreted or intended as anything but "-(1^2)", which is just ignorant.
« Last Edit: December 30, 2014, 03:10:20 pm by suicidaleggroll »
 

Offline electr_peter

  • Supporter
  • ****
  • Posts: 936
  • Country: lt
Re: A little bit of a maths problem with indices
« Reply #37 on: December 30, 2014, 03:32:39 pm »
Question is why one would write something like -2^2 in a program at all? That is not efficient and borderline crazy - pre-calculate and then white full number/constant and save some clock cycles.

If you are paranoid that your writing can be misinterpreted, rewrite equation in a different way or use parenthesis everywhere.
If you are paranoid that you can not interpret writings of other people, that is your problem.

All this minus ("-") stuff has nothing to do with any compilers or mathematics itself. It has something to do with the users.
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1455
  • Country: us
Re: A little bit of a maths problem with indices
« Reply #38 on: December 30, 2014, 04:11:06 pm »
Question is why one would write something like -2^2 in a program at all? That is not efficient and borderline crazy - pre-calculate and then white full number/constant and save some clock cycles.
You must not do a lot of work with complicated equations and math in programs?  Any decent compiler will pull it out, that's not a problem, but clarity is.  Writing known constants correctly has great value when using large equations, it makes finding mistakes and making your intent clear without even having to comment it.  Boiling complicated equations down as far as possible, while it might make you feel better about yourself, won't make the resulting code any quicker (as long as the compiler is reasonably intelligent), it will just make debugging next to impossible.


All this minus ("-") stuff has nothing to do with any compilers or mathematics itself. It has something to do with the users.
The problem is the translation between mathematical concepts and their symbolic representations in our numeral system.

Negative two is a concept, it's not "negative one times two", it is its own number.  It just so happens that our numeral system represents the number "negative two" as "-2", which could also be interpreted as "-1*2", and that's where the breakdown occurs.  By introducing the multiplication by -1 (also its own number, or is it -1*1?  Which would be -1*1*1, and so on), you add an operation, which means PEMDAS takes effect and you have the opportunity to screw things up unless you add parenthesis to force the compiler, reader, whoever to interpret that number as "negative two" instead of "negative one times 2".

Math is unambiguous, but the symbolic representation of math in our numeral system is not.  Just like our language itself, there are multiple meanings, implications, etc. that need to be taken into account if you want to interpret an ambiguous combination of symbols in the way the author intended.  In an ideal world people would always use parenthesis to clarify their intent and there would never be a problem, but the real world isn't so simple.  People make implications or assumptions without even realizing it, usually through laziness, and when that happens it's up to the reader to recognize at least the possibility of an error and take appropriate action, whether it's to ask the author to clarify or to look up the source and re-derive the equation from scratch to verify.  -12 is one of those cases.
« Last Edit: December 30, 2014, 04:16:55 pm by suicidaleggroll »
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 1994
  • Country: nl
Re: A little bit of a maths problem with indices
« Reply #39 on: December 30, 2014, 04:42:46 pm »
Buy a decent calculus book is all I can say.

-1^2 is not open for interpretation. No, not even if you have been taught so by some lying community college pamphlet or other. What you have there is the unary minus operator and the power operator, and operator precedence. As luck would have it, any university level calculus or algebra book I have ever read that starts with a formal definition of the algebra also defines the unary minus roughly like so:

unary minus operator acting on an element a: -a, such that (-a) + (a) = 0

And precedence is also totally defined.

-a^n = -(a^n)

The End. No debate, no context. Come on, this is math. Yes, great idea, lets make things ambiguous when there is an easy way to define things clearly. Pfffffrt.  ::)

Of course you don't have to believe me. In which case give me a book reference for a decent uni level calculus or algebra book that opens up the unary minus for debate. That said, it cannot hurt to explicitely use some parenthesis. So yes, I would probably also write (-1)^2 just to be sure there is no confusion induced by a less formal math education. But to say that -1^2 is ambiguous is bullshit. The definition is the definition, and -1^2 = -(1^2) = -1. Power operator takes precedence over unary minus.

The situation also is not helped by programming languages, where things can be different. But we are talking about mathematics in written form here, and there the definition is clear. So please no "examples" from the field of programming please. Different different thing is different because it is not the same. The topic here is written mathematics, zero computers, zero software.

I can quote wikipedia here (since it backs up my argument), but for subtle points like this wikipedia sucks. I certainly would not accept it as an authoritive answer to something like this, so I will not inflict it on someone else either. ;) This is a reasonable post on the subject, but not authoritive either: http://mathforum.org/library/drmath/view/53194.html

In closing, get a decent calculus book and check the definitions.
 

Offline electr_peter

  • Supporter
  • ****
  • Posts: 936
  • Country: lt
Re: A little bit of a maths problem with indices
« Reply #40 on: December 30, 2014, 04:55:02 pm »
Question is why one would write something like -2^2 in a program at all? That is not efficient and borderline crazy - pre-calculate and then white full number/constant and save some clock cycles.
You must not do a lot of work with complicated equations and math in programs?  Any decent compiler will pull it out, that's not a problem, but clarity is.  Writing known constants correctly has great value when using large equations, it makes finding mistakes and making your intent clear without even having to comment it.  Boiling complicated equations down as far as possible, while it might make you feel better about yourself, won't make the resulting code any quicker (as long as the compiler is reasonably intelligent), it will just make debugging next to impossible.
I do write programs including heavy computational stuff, just for you to know.
You know, there is concept called comments in almost every programming language. Expecting every computable program line to be easily read by anyone without a clue is a share lunacy.
There are various ways to deal with the simplification - but that is still a problem for you.

All this minus ("-") stuff has nothing to do with any compilers or mathematics itself. It has something to do with the users.
The problem is the translation between mathematical concepts and their symbolic representations in our numeral system.

[rambling about how you don't understand definitions]
What is your problem? You seem to have problem understanding basic concepts of mathematics, yet still you claim to have a strong point about something.
Teach yourself something - read introductory booksabout algebra, mathematic definitions and logic.
« Last Edit: December 30, 2014, 04:59:47 pm by electr_peter »
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1455
  • Country: us
Re: A little bit of a maths problem with indices
« Reply #41 on: December 30, 2014, 05:49:12 pm »
*bangs head against wall*

You're right, there's no such thing as negative numbers, only negative unary operators on positive numbers.

Pointless debate is pointless, I'm out.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 1994
  • Country: nl
Re: A little bit of a maths problem with indices
« Reply #42 on: December 30, 2014, 06:01:39 pm »
Just because you have a use case and youthink math should work such and such does not make it so. And that is the whole point here. I get your confusion and why you think it should be the way you would like it to be, but the definition does not give a shit about your confusion nor your feelings. It is what it is. No point arguing because you would like things to be different.

The math is well defined. Read a book.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7805
  • Country: us
  • adieu
Re: A little bit of a maths problem with indices
« Reply #43 on: December 30, 2014, 06:11:30 pm »
Question is why one would write something like -2^2 in a program at all? That is not efficient and borderline crazy - pre-calculate and then white full number/constant and save some clock cycles.
You must not do a lot of work with complicated equations and math in programs?  Any decent compiler will pull it out, that's not a problem, but clarity is.  Writing known constants correctly has great value when using large equations, it makes finding mistakes and making your intent clear without even having to comment it.  Boiling complicated equations down as far as possible, while it might make you feel better about yourself, won't make the resulting code any quicker (as long as the compiler is reasonably intelligent), it will just make debugging next to impossible.
I do write programs including heavy computational stuff, just for you to know.
You know, there is concept called comments in almost every programming language. Expecting every computable program line to be easily read by anyone without a clue is a share lunacy.
There are various ways to deal with the simplification - but that is still a problem for you.

The compiler will do the computation before compiling. This is not up for debate - grab the assembly output and look at it. What kind of shitty compiler wouldn't?

This is "share" lunacy:

Code: [Select]
// 3*5*7*9*11*13*15*17 = 34459425
i += 34459425;

What kind of shitty programmer would write that? The compiler will generate the exact same code for this:

Code: [Select]
i += 3*5*7*9*11*13*15*17;

Quote
Expecting every computable program line to be easily read by anyone without a clue is a share lunacy.

No, it's common freaking sense. :palm:

And for Christ's sake, why are we arguing about the order of operations at all? All you people who think -2^2 is ambiguous might as well be arguing that 2+2 is ambiguous because someone might look at it with his head cocked and mistake the + for a ×! It's absurd. There is a defined order of operations, and negation falls in that. That is not ambiguous.

That, by the way, is a completely different argument to whether or not it's good practice, for the sake of the understanding of people who don't know the order of operations. "Ambiguous" and "unclear" are not the same thing. Using points from one argument against the other argument is just hamfisted - surely you people can produce better arguments than that.
« Last Edit: December 30, 2014, 06:19:03 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline electr_peter

  • Supporter
  • ****
  • Posts: 936
  • Country: lt
Re: A little bit of a maths problem with indices
« Reply #44 on: December 30, 2014, 06:28:44 pm »
The compiler will do the computation before compiling. This is not up for debate - grab the assembly output and look at it. What kind of shitty compiler wouldn't?

This is "share" lunacy:

Code: [Select]
// 3*5*7*9*11*13*15*17 = 34459425
i += 34459425;

What kind of shitty programmer would write that? The compiler will generate the exact same code for this:

Code: [Select]
i += 3*5*7*9*11*13*15*17;
You suggested this poor example. There is nothing to comment really.
And not everything can be written in numbers - you can use various constants and variables (end result would be the same). Variable name can explain number value  better than number itself.

Quote
Quote
Expecting every computable program line to be easily read by anyone without a clue is a share lunacy.
No, it's common freaking sense. :palm:
Expectation for every line to be easily readable is a share lunacy. Programming in a way that is readable is(and should be) a common sense.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7805
  • Country: us
  • adieu
Re: A little bit of a maths problem with indices
« Reply #45 on: December 30, 2014, 06:33:02 pm »
You suggested this poor example. There is nothing to comment really.
And not everything can be written in numbers - you can use various constants and variables (end result would be the same). Variable name can explain number value  better than number itself.

Yes, obviously the use of "magic numbers" is also poor practice, but that's a separate point. Obviously I didn't have a real-life use case immediately available, so I grabbed some numbers to demonstrate my point...
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 9639
  • Country: us
Re: A little bit of a maths problem with indices
« Reply #46 on: December 30, 2014, 08:03:47 pm »
Come on, this is math.
No, it's not math. It's a fussy, anally retentive argument about symbols on a screen, somewhat akin to language pedants arguing about grammar. Grammar is not communication any more than a symbolic notation is mathematics. To believe that PEMDAS (which, by the way is alien to the British, who are familiar with BODMAS) is relevant to the study and understanding of mathematics is to completely miss what mathematics is about.
I'm not an EE--what am I doing here?
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 1994
  • Country: nl
Re: A little bit of a maths problem with indices
« Reply #47 on: December 30, 2014, 08:55:31 pm »
The this in that (*) quote was intended as having a little wider scope than the yesnoyesno argument going on, but what the hell. You can read it that way if you like. My bad for not dereferencing every fucking word to prevent an out of context quote. :P I'll agree with you that there are more important parts about math than the purely pedantic parts. Anyways, I stand by what I wrote and am done with this thread as well. Enjoy! :-+

(*) Uh-oh another reference.
 

Offline Neganur

  • Supporter
  • ****
  • Posts: 1114
  • Country: fi
Re: A little bit of a maths problem with indices
« Reply #48 on: December 30, 2014, 09:34:28 pm »
You seem to have done a complete 180 since posting this just a few hours before (with which I agree completely):

I did not change my position, I still agree with you that there are cases where people use poor style and I think that it is pointless to argue about it because it is very clear to those people what was meant (think of a typical person writing on the blackboard while talking to an audience and never using parenthesis when substituting - possibly even announcing that he does so, before he starts).

However, I shifted my focus a bit more to the point that this is not the way maths is being taught and that it, strictly speaking, is wrong.

I am a bit worried about the argument that compilers or calculators do it wrong, it sounds more like poor implementation of the expressions by the programmer. It also sounds like you have to evaluate (and correct) "what the hell did the programmer mean" on a regular basis? You have all my sympathy in that case, that does not sound like it is fun.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 14758
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: A little bit of a maths problem with indices
« Reply #49 on: December 31, 2014, 12:52:17 am »
Oh, just a niggle about "indices":

You're talking about exponents (superscript following a quantity).

Indices are, in most notations, a subscript following a variable, which is used to convey something about that variable.  Much as a function f(x) is used to provide a value to the expression for f, the index F_i is used to provide a value to the expression for F.

Typical uses of indices include discrete time systems -- DSP -- where the sample number (and therefore time) is indicated with an index, as x[i ] or x_i.

(And yes, you can have both, so {x_n}^2 is called "x sub n squared" or "nth value of x, squared".  Ugh, this gets tricky to talk about, because I want to use the braces {} to indicate that the 'square' goes outside of the index.  It's not enough to say "x_n^2" because, the way that's usually formatted, the 2 looks like a superscript index -- which is indeed used occasionally as an index as well!  Yes, some branches of math use both superscript and subscript indices.  Some also use prefix indices.)

TLDR: mathematicians can't make up their mind on coherent formatting..? :-DD

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf