Number Theory

Real Numbers Are Dull

summary: 

Real numbers are dead dull in an animation, nailed to the origin, the only differences involving when they blink.

description: 

The real number -1 in blue is added to the real number 3 in yellow to generate the real number 2 in green.

The global economy is fueled by real numbers. This is somewhat frightening when you realize how excedingly dull real numbers are in an animation. They are paralyzed, able to exists in only one place, the origin 0, 0, 0. Their variation comes from blinking at different times from now. Minus real numbers are in the past, positives in the future, and only one point may exist at the origin at time zero or now. This set of blinking lights is totally ordered: a real number at the origin will either be before, after or at the same time as another point.

command: 
q_graph -dir vp -out real -loop 0 -box 4 -command 'echo -1 0 0 0' -color blue-command 'echo 3 0 0 0' -color yellow -command 'q_add -1 0 0 0 3 0 0 0' -color green
youtube embed: 
Outside video: 
math
equation: 

(q + q^*)/2 = (t, 0, 0, 0)

tags
Math Tag: 
real numbers
Programming Tag: 
command line quaternions
q_add

Complex Numbers Move Straight

summary: 

Complex numbers are constrained to move with their basis vectors, unable to explore all of spacetime.

description: 

Complex numbers have some freedom to move in space. The 3 straight lines indicate a choice of Cartesian basis vectors, but other basis vectors could have been chosen. Complex numbers are used extensively in quantum mechanics. Yet the obvious limitations in the animations suggest we should rebuild the foundations of complex-valued quantum mechanics. Sounds like a lot of work!

command: 
q_graph -out complex -dir vp -loop 0 -box 5 -command 'q_add_n -3 4 0 0 .002 -0.008 0 0 1000' -color yellow -command 'q_add_n 4 0 4 0 -.006 0 -0.008 0 1000' -color blue -command 'q_add_n -6 0 0 -6 .012 0 0 .012 1000' -color green
youtube embed: 
math
equation: 

(2 q + q^* + (i q i)^*) / 2 = (t, x, 0, 0)
(2 q + q^* + (j q j)^*) / 2 = (t, 0, y, 0)
(2 q + q^* + (k q k)^*) / 2 = (t, 0, 0, z)

tags
Math Tag: 
real numbers
complex numbers
Programming Tag: 
command line quaternions
q_add_n

Quaternion Addition = An Inertial Observer

summary: 

Quaternion addition results in constant linear motion, the only motion covered in special relativity.

description: 

Quaternion addition is the simplest of all math actions one can do. The animation is also easy to understand: a dot moves at a steady pace.

command: 
q_graph -dir vp -out addition -loop 0 -box 2 -command 'q_add_n -2 2 -2 .5 .004 -.003 .0035 -.001 1000'
youtube embed: 
Outside video: 
math
equation: 

q_a+n*q_b=q_{abn}

tags
Math Tag: 
addition
addition
addition
addition
addition
addition
addition
addition
addition
addition
addition
addition
addition
addition
addition
addition
addition
Programming Tag: 
command line quaternions
q_add_n

The Norm Requires a Clock

summary: 

The norm of spacetime is only about time.

description: 

The input is in yellow. The conjugate of the input is in blue, a 3D spatial reflection. The norm that results from multiplying yellow and blue is in green. Nailed to the origin, no ruler is needed, only a watch to record how long into the future is any spacetime norm.

command: 
q_graph -box 6 -loop 0 -dir vp -out norm -command 'q_add_n -2 -3 1 2 .004 .003 -.0005 -.003 1000' -color yellow -command 'q_add_n -2 -3 1 2 .004 .003 -.0005 -.003 1000 | q_conj' -color blue -command 'q_add_n -2 -3 1 2 .004 .003 -.0005 -.003 1000 | q_norm' -color green
youtube embed: 
Outside video: 
math
equation: 

norm(q) = q^* q

tags
Math Tag: 
norm
norm
norm
Programming Tag: 
command line quaternions
q_norm
q_add_n

Polynomials

2nd Order Polynomials

summary: 

A second order polynomial may have as many as two events appear in an animation at one moment in time.

description: 

The input in yellow goes directly through the origin. The polynomial in red never makes it to positive time. Near the origin, a second red dot appears to run at the other for an annihilation, which should become a familiar sight. Because the coefficients are reals, and the input goes through the origin, the polynomial is in exactly the same line as the input. There is nothing to "knock it" into another place in space.

command: 
q_graph -out poly_2_origin -dir poly -box 6 -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000 | q_poly -n 2 -c 1 -n 1 -c 3 -n 0 -c -2' -color red -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000' -color yellow
math
equation: 

As q goes from (-3, -3, -,3 -3) to (2, 2, 2, 2):
q^3 + 3 q - 2

tags
Math Tag: 
polynomials
Programming Tag: 
command line quaternions
q_add
q_poly

3rd Order Polynomials

summary: 

A third order polynomial can have three events appearing in an animation at once (this is not required, but represents a maximum).

description: 

The input which travels through the origin is shown in yellow. A cubic polynomial is in red. The polynomial continues its march down and to the left after a brief moment of indecision. The coefficients are all real, so the red and yellow are all in the same line.

command: 
q_graph -out poly_3_origin -dir poly -box 5 -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000 | q_poly -n 3 -c 1 -n 1 -c 3 -n 0 -c -2' -color red -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000' -color yellow
math
equation: 

Input: q ranges from (-3, -3, -,3 -,3) to (2, 2, 2, 2)
Output: q^3 + 3 q -2

tags
Math Tag: 
polynomials
Programming Tag: 
command line quaternions
q_add
q_poly

5th Order Polynomials

summary: 

A fifth order polynomial can change its directions as this one does three times.

description: 

The input is in yellow and goes through the origin. The polynomial in red has real coefficients. Perhaps a different polynomial could switch directions 5 times, although I have yet to construct one.

command: 
q_graph -out poly_5_origin -dir poly -box 5 -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000 | q_poly -n 5 -c 1 -n 1 -c 3 -n 0 -c -2' -color red -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000' -color yellow
math
equation: 

Input: (-3, -3, -3, -3) to (2, 2, 2, 2)
Output: q^5 + 3 q - 2

tags
Math Tag: 
polynomial
Programming Tag: 
command line quaternions
q_add
q_poly

2nd Order Polynomials With Quaternion Coefficients

summary: 

A polynomial can be shifted the input line with quaternion coefficients. This is an example of a subtle shift, but it would be trivial to make much more radical changes to the polynomial.

description: 

The yellow line is the input, the red line a 2nd order polynomial with real coefficients, and the green line is the same polynomial with quaternion coefficients. The coefficients are only subtly different as shown in the animation. The green line is never quite in line with the yellow/red line.

command: 
q_graph -out poly_2_q_coeffients -dir poly -box 6 -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000 | q_poly -n 2 -c "1 0.1 0 0" -n 1 -c "3 0 .2 0" -n 0 -c "-2 .01 .01 .01"' -color green -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000 | q_poly -n 2 -c 1 -n 1 -c 3 -n 0 -c -2' -color red -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000' -color yellow
math
equation: 

Input: (-3, -3, -3, -3) to (2, 2, 2, 2)
Ouput: (1, 0.1, 0, 0) q^2 + (3, 0, .2, 0) q - (-2, .01, .01, .01)

tags
Math Tag: 
polynomials
Programming Tag: 
command line quaternions
q_add
q_poly

3rd Order Polynomials with Quaternion Coefficients

summary: 

The green line takes a slightly bigger step away from its real coefficient counterpart. Polynomials can be curved in space due to their quaternion coefficients.

description: 

The input in yellow passes through the origin. The red input has real coefficients, and stays exactly in line with the yellow. The green line with its complex coefficients curves though space, but has the same large scale features as the red line - a reverse s shape.

command: 
q_graph -out poly_3_q_coeffients -dir poly -box 5 -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000 | q_poly -n 3 -c "1 0.1 0 0" -n 1 -c "3 0 .2 0" -n 0 -c "-2 .01 .01 .01"' -color green -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000 | q_poly -n 3 -c 1 -n 1 -c 3 -n 0 -c -2' -color red -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000' -color yellow
math
equation: 

Input: (-3, -3, -3, -3) to (2, 2, 2, 2)
Output in red: q^3 + 3 q - 2
Output in green: (1, .1, 0, 0) q^3 + (3, 0, .2, 0) q - (2, .1, .1, .1)

tags
Math Tag: 
polynomials
Programming Tag: 
command line quaternions
q_add
q_poly

3rd Order Polynomial Not Through the Origin

summary: 

When the input does not go straight through the origin, the behavior of the polynomial becomes hard to guess in both the animations and complex planes.

description: 

The yellow line is the input that goes through the origin for red, a cubic polynomial with real coefficients. The blue line is an input that does not go through the origin, making the curved orange line. That curve appears to line in a plane defined by the yellow and blue lines. The shape of the orange line is distinct from that of the red line. What goes in can dramatically change what comes out. The sharp bend in the t-x graph for the orange line was unexpected.

command: 
q_graph -out poly_3_off_diagonal -dir poly -box 5 -command 'q_add_n -3 -3 -3 -3 .006 .005 .004 .003 1000 | q_poly -n 3 -c 1 -n 1 -c 3 -n 0 -c -2' -color orange -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000 | q_poly -n 3 -c 1 -n 1 -c 3 -n 0 -c -2' -color red -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000' -color yellow
math
equation: 

Input for red: (-3, -3, -3, -3) to (2, 2, 2, 2)
Input for orange: (-3, -3, -3, -3) to (3, 2, 1, 0)
Output for red and orange: q^3 + 3 q - 2

tags
Math Tag: 
polynomials
Programming Tag: 
command line quaternions

Graphs

Graph theory details how things are connected. There are nodes that are connected by edges. The edges can either be directional or undirectional. Here is the graph for real number multiplication:

real_graph.png

One times one makes a loop bringing you back to one. This may be the most important loop in all of mathematical physics since it provides a mechanism for particles to keep on being themselves, just getting a little older. The same type of number (reals) can loop with itself.

complex_graph.png

Contrast this with the graph for complex numbers. The only edges out to the imaginary node and back are directional. 1 times i gets to i, but i must be multiplied by -i to get back to one, a different road. Graph theory provides a reason why real numbers are different from imaginary numbers (I wish this had been pointed out at the start). There is a loop, but involves the imaginary vertex working with the real edge.

q_graph_ham.gif

The graph for Hamilton's quaternions continue the theme of imaginary numbers. The undirectional edges are all loops using real numbers. At least on this site, the real number is time so this graph was animated to make the suggestion more concrete. The three imaginary nodes are what is needed for the three dimensions of space. Things out in space can be reflected in mirrors, which flip handedness, a signal for directional edges. Every node has the four types of edges, but only the real number has a loop which matches the color of the node.

q_graph_even.gif

If all the edges are undirectional, the graph applies to hypercomplex numbers, or what I call the California representation of quaternion multiplication.

When you do graph theory with clay and pipe cleaners, the simplicity of the California representation is clear: only one pipe cleaner goes between each node instead of two. Nature must use this sort of math tool often, which I think it does for inertia.

Random Graphs in Time and 3D Space

summary: 

Some 6000 nodes were generated, and if close enough in both time and space, were linked together. There is no pattern here, and none was expected.

description: 

A random graph in spacetime looks both random and transient. It might be interesting to know how many of these short paths have branches. For this initial sketch, I did not provide a means of tracking the more complicated graphs.

command: 
q_graph -dir networks -out random_3d_6000 -box 1.2 -command "generate_random_network -nodes 6000"
math
equation: 

Link nodes if dt < 0.05 and |dx|+|dy|+|dz| < 0.15

tags
Math Tag: 
graphs
Programming Tag: 
command line quaternions
generate_random_network

Random Graphs in Time and 2D Space

summary: 

Random graphs in a plane can be relevant for where to place cell phone towers, so this topic is studied commercially.

description: 

There are 6000 nodes used in this animation. How many survived by being close enough to another node is not known.

command: 
q_graph -dir networks -out random_3d_6000_y -box 1.2 -command generate_random_network -nodes 6000 -fix_y -1
math
equation: 

Link nodes if dt < 0.05 and |dx|+|dz| < 0.15, y = -1

tags
Math Tag: 
graphs
Programming Tag: 
command line quaternions
generate_random_network