So what is this?
We solve this shape back in part one and proceeded to not talk about it for like ten episodes
And at this point i really wouldn't blame you if you thought this was some science-fiction designed to get you excited about doing boring algebra problems,
But before we chalk this up to unnecessary special effects, let's remember where the shape came from.
We began our conversation in part one with an equation that appeared to have no solution: x^2+1=0.
And after all the work we've done so far you can probably see how to find the answer algebraically:
subtract 1 from both sides of the equation and take the square root resulting in x equals plus or minus i, done.
So that's cool, but to really make sense of out shape from part one we need to dig a little deeper and talk about functions of complex variables.
The kinds of functions most of us are used to the functions of real numbers have inputs and outputs that can be visualized using a single dimension.
This means all our x values that are in a single number line and so do our y values
it seems pretty reasonable then that if we want to figure out how x and y are related
we should put our x number line facing one way on a piece of paper and put our y number line on the same piece of paper just facing the other way.
This form a two-dimensional grid known as the Cartesian Coordinate System
apparently invented by Rene Descarte in the 16th century after watching flies crawl around.
The Cartesian Coordinate System is a super powerful tool for understanding the relationship between two variables.
The Cartesian Coordinate System is powerful because it allows us to take abstract ideas like functions and turn them into something our brains can grasp much more intuitively - shapes
By giving each point on the plots very own coordinates Descarte was able to bring together the two largest areas of mathematics at the time - algebra and geometry.
This greatly aided early efforts at classifying functions by Newton and others
and today the Cartesian Coordinate System shows up everywhere helping us do all kinds of things like spot trends in data.
So that's all fun and wonderful but the Cartesian Coordinate System does come with a disclaimer: it only works in two dimensions.
This limitation becomes a real problem when we start to think about functions of complex variables.
These functions taken complex numbers for their inputs and for the most part also output complex numbers.
This means the numbers we put in and get out of our function and no longer fit on number lines
we need two complex planes to keep track of our numbers: one for our input and one for our output.
This raises an important question if when visualizing these function but we're really interested in is the connection between the input and output.
How do we visualize what's happening on both planes simultaneously?
We could try to fit our input and output planes together somehow as we did with our number lines for real valued functions.
But we quickly run into a pretty serious issue.
As you likely know the universe we live in has three spatial dimensions, so there's no way to fit the four spatial dimensions we needed to a single structure that our brains can comprehend, we simply run out of dimensions.
Fortunately there are some very clever ways to see the relationship between two complex variables,
but before we can get to these we need to think about the mathematics of complex functions.
Even though using separate planes for our input and output is not a perfect solution,
this approach can still help get us started.
Let's try it out with our original function f(x)=x^2+1.
Before we begin let's make a quick variable change to make things easier down the road
we'll change the name of our input variable from x to z and call our output variable w.
Since z and w each have a real and imaginary part,
let's go one step further and give these parts names.
We'll let z=x+iy, so x represents the real part of z and y represents the imaginary part.
We'll also let w=u+iv.
Just as we can use tables to keep track of our inputs and outputs for real valued functions we can also use tables to keep track of our inputs and outputs for complex functions.
However we now need four columns to keep track of our four variables: x, y, u and v.
We can now experiment with our function f(x)=z^2+1.
If we plug in a complex number to our function for example z=1+i, we can do a little algebra and obtain our result: w=1+2i.
Planning our inputs and outputs we see that the point 1+i on our input plane was pushed or mapped by our function to 1+2i in our output plane.
Let's plug in a fet more points here and see if we can find a pattern.
If we test points along a straight line in our input space
we see that in our output space are straight line is transformed into a curved line, interesting.
As you can imagine plug in points like this can get pretty tedious.
To speed things up let's let the computer do it for us and instead of having our computer just map certain points, let's have it map all the points.
We'll take advantage of the fact that the image you're seeing is just a collection of pixels that happen to be arranged on a grid.
We'll use some code written in the programming language Python to move every single pixel in our input space to its proper location in the output space.
To make this work we'll assign each pixel in our input video a complex number that correspongs to its location on the complex plane.
We can then let our code take care of the tedious work of moving each pixel to its new location ad dictated by our function z^2+1.
Our code will move points exactly as we did by hand before.
If we have a blue pixel at the 1+i location on our input graph
then this blue pixel will be moved to the 1+2i location on our output graph, because (1+x)=(1+2i).
We saw before that our function warped a straight horizontal line into a curvy one,
so it should have some interesting effects on our video.
We'll include some reference markers on top of our input and output planes to keep track of our numbers,
but we won't transform these pixels.
All right, ready?
Let's start by drawing some simple lines.
A horizontal line along the positive x-axis turns out to be somethins pretty similar in our output space.
But what about a line along the positive imaginary axis?
This line appears to have been rotated. As we add more lines we begin to see a pattern.
Our family of straight lines is turned into a family of curved lines. Cool! Right?
So we found one pattern but how is this pattern explained by our function z^2+1?
And more importantly, how does this fir with everything else we've learned about complex numbers?
What else would be interesting to draw in our input space to test our mapping?
What shape would you draw to learn more about what our function is doing?
Next time more shapes.
Thanks for watching!