r/askscience • u/AutoModerator • 12d ago
Ask Anything Wednesday - Engineering, Mathematics, Computer Science
Welcome to our weekly feature, Ask Anything Wednesday - this week we are focusing on Engineering, Mathematics, Computer Science
Do you have a question within these topics you weren't sure was worth submitting? Is something a bit too speculative for a typical /r/AskScience post? No question is too big or small for AAW. In this thread you can ask any science-related question! Things like: "What would happen if...", "How will the future...", "If all the rules for 'X' were different...", "Why does my...".
Asking Questions:
Please post your question as a top-level response to this, and our team of panellists will be here to answer and discuss your questions. The other topic areas will appear in future Ask Anything Wednesdays, so if you have other questions not covered by this weeks theme please either hold on to it until those topics come around, or go and post over in our sister subreddit /r/AskScienceDiscussion , where every day is Ask Anything Wednesday! Off-theme questions in this post will be removed to try and keep the thread a manageable size for both our readers and panellists.
Answering Questions:
Please only answer a posted question if you are an expert in the field. The full guidelines for posting responses in AskScience can be found here. In short, this is a moderated subreddit, and responses which do not meet our quality guidelines will be removed. Remember, peer reviewed sources are always appreciated, and anecdotes are absolutely not appropriate. In general if your answer begins with 'I think', or 'I've heard', then it's not suitable for /r/AskScience.
If you would like to become a member of the AskScience panel, please refer to the information provided here.
Past AskAnythingWednesday posts can be found here. Ask away!
5
u/oldfashionedguy 12d ago
Why is the square root of -1 special? As I understand it, this holds some special significance. Just wondering where it comes from.
13
u/Bradm77 12d ago edited 12d ago
It's special because it allows us to solve problems that without it we wouldn't be able to solve. For example, before we allowed the square root of -1 to be a valid number, we had no solution to a problem like x2 +1=0.
It creates a whole new type of number that we call "complex numbers." Complex numbers are used in electrical engineering to describe voltages, currents, electromagnetics, etc. It's used in all kinds of applications from computer graphics, to sound engineering, to GPS and other signals, robotics, artificial intelligence.
1
8
u/maestro2005 12d ago
Complex numbers (numbers with an "imaginary" part) bridge a gap that forms when you start dealing with exponents. That whole "imaginary" moniker is unfortunate--they're no more real or imaginary than any other kind of numbers. All numbers are made-up. You can't go to the store and buy a 2. But 2 as an idea is clearly useful, and complex numbers are useful too.
Think back if you can to your early school years. You learn about numbers, specifically what we would call the "natural numbers": 0, 1, 2, 3, etc. Then you learn about addition. 2 + 2 = 4. If I have 2 apples and then get 2 more, then I have 4. Makes perfect sense. Then you learn about subtraction. If I have 3 apples and eat 2, I'm left with 1. Makes perfect sense. But what if I try to do 2 - 3? Uh oh, that doesn't work. I can't eat 3 apples if I only have 2. You probably look at that now and think, 2 minus 3 is negative 1, but way back when you were little you might have been taught that it "doesn't exist", and that's not wrong, in certain situations.
Later, you learn about negative numbers, and you extend the "natural numbers" into the "integers" -- positive and negative whole numbers (and zero). Some kids balk at the idea of negative numbers when they're first introduced. You can't have a negative apple. I can't have 2 apples, somehow succeed in eating 3, and be left with -1 apples. But negative numbers are useful, and even without getting into real-world scenarios where you can have negative value (like bank accounts), just allowing numbers to dip negative is useful: I have 2 apples, I want to bake a pie that needs 6 apples, so I buy a bag of 7 apples. How many am I going to be left with? 2 - 6 = -4, + 7 = 3. Silly example maybe, but the point is: negative numbers allow addition and subtraction to always work. I didn't have to tread carefully and make sure I do things in the right order. And that turns out to be critically important later on.
Then a similar problem arises with multiplication and division: Multiplication always works, but division sometimes gets you in a pickle. And you probably learned about long division and remainders: 8 / 3 = 2 with a remainder of 2. It "doesn't divide evenly". Then you learn about fractions ("rational numbers").
Then the problem arises again when you start doing exponents. You can always square any number, but square roots don't exist for negative numbers. More generally, quadratic equations (equations of the form ax2 + bx + c = 0) sometimes have 2 solutions, and sometimes have none (sometimes they have 1, that's a separate thing to talk about). Complex numbers save the day here, and among other things, allow us to take the square root of a negative number. Expanding our system of numbers into the complex plane, and generalizing exponents beyond "multiplying by yourself n times" gives us a system where exponents/roots always exist and always behave the same way (well... mostly). And that ends up being critically important for systems that are described by exponents, and exponential functions have a deep tie to oscillation and rotation.
Just as it's useful to be able to add and subtract even if the numbers go negative, it's useful to be able to exponentiate and take roots even if the numbers go "imaginary".
1
u/Borgcube 12d ago
Complex numbers save the day here, and among other things, allow us to take the square root of a negative number.
So, you might know this but quadratic equations are not the reason imaginary and complex numbers were introduced - it was cubic equations.
Short version of the story is:
A guy named Al-Khwarizmi wrote a book called Al-Jabr. The book describes how to solve any quadratic equation.
Renaissance Italy mathematicians have the book, know all about it, but then start figuring out cubic equations. It's a big deal to them, they have math duels and such over it.
Turns out that cubic equations (with real coefficients) always have either 1 or 3 solutions. When they have 3 solutions they can always be rewritten as a(x-x0)(x-x1)(x-x2) where x0, x1 and x2 are the solutions. A few of them, Cardano and del Ferro, figure out that they can do that even when there's only one solution if they "imagine" that x1 and x2 are numbers that have a square root of -1 somewhere. They don't care about those at all except as a way to get to the solution they want.But then other mathematicians start poking around it all, and then Euler and the rest is far more complicated.
2
u/Borgcube 12d ago
It's not special. It's simply useful for various reasons in math and engineering.
-3
12d ago
[removed] — view removed comment
1
u/Borgcube 12d ago
"Possible" in math is simply what mathematicians agree is possible. You're making the mistake of thinking about this as defined by the real-world. But it's not, real numbers are no more "real" and sqrt(2) is no more "possible" than sqrt(-1).
3
u/logperf 12d ago
If a new programming language were released and it's not just a new syntax, but it introduces new concepts, would LLMs be mostly unable to use it effectively (or at least use the new features) until enough human-written code is available as training data?