#Quaternions are a single number

1 messages · Page 1 of 1 (latest)

kind herald
#

@harsh atlas

harsh atlas
#

Nice

#

Ok so

#

Matrixes are like

kind herald
#

yes i see your point

harsh atlas
#

Multiple numbers

#

And quaternions is one number

kind herald
#

no

harsh atlas
#

Like it's 4 values added together

#

Tell me is 2 + 3 one number or two numbers

#

(2+3)

kind herald
#

a quaternion is a 4x4 matrix

harsh atlas
#

A quaternion is a what

#

Whuh

#

It's not a matrix?

#

Or am I wrong

kind herald
#

it is a matrix

harsh atlas
#

Aren't they literally just a+bi+cj+dk

kind herald
#

it's a bit more complex than that

harsh atlas
#

It can't be 16 numbers whuh

kind herald
#

huh

harsh atlas
#

Ok I admit I know barely anything about quaternions

kind herald
#

yes

#

but

#

let me ask you
2x + 2y

harsh atlas
#

A 4x4 matrix consists of 16 values no

kind herald
#

add it up

harsh atlas
#

Ye it's a single number

kind herald
#

how much is 2x + 2y?

harsh atlas
#

We have no clue what it is but it's one number

#

It's 2x + 2y

kind herald
#

2 + 2 is a single number, because it's a 4

harsh atlas
#

Also x and y are variables

kind herald
#

but you have two components in that number

harsh atlas
#

i j and k are not variables

#

They're constants (?)

#

Or are you talking about a b c and d

#

In that case I get ur point

kind herald
#

a quaternion consists of a + bi + cj + dk like you said

#

ye

harsh atlas
#

Alright I get ur point

#

It has 4 variables in it

#

4 components

kind herald
#

yes

harsh atlas
#

But ultimately it's one number

#

With 4 variables

kind herald
#

a single quaternion cannot be 4, or 8, or 20

harsh atlas
#

Much like x + y + z is one number with 3 variables

harsh atlas
kind herald
harsh atlas
#

Quarternions include real numbers but they are not just that

#

5 is a quaternion

kind herald
#

okay lemme ask you

#

is a vector a single number

harsh atlas
harsh atlas
kind herald
#

do you know how do you write down a vector?

harsh atlas
#

Quaternions are not vectors

harsh atlas
#

You write down a quaternion as a+bi+cj+dk as I said

#

I think

#

Like I said, a quaternion can be 4 or 8 or 20

kind herald
#
Khan Academy

Learn for free about math, art, computer programming, economics, physics, chemistry, biology, medicine, finance, history, and more. Khan Academy is a nonprofit with the mission of providing a free, world-class education for anyone, anywhere.

#

just like a quaternion

#

you can write them down multiple ways

#

one of the ways you can write them down is 1i + 2j +3k if they are 3D

harsh atlas
#

Crap I can't open khan academy website

kind herald
harsh atlas
#

i j k

kind herald
#

see the connection?

harsh atlas
#

That's a quaternion with a being 0

#

Which is a number

#

Wait I think the little

#

Uhh

#

^ things

#

Make it not a quarternion?

kind herald
#

well yes, quaternions are just translations of vectors

harsh atlas
#

Ok question

#

Is a complex number a number

#

Is 2 + 5i a number

kind herald
#

that w (the first number) is always sin(angle) + cos(angle)

harsh atlas
#

?

kind herald
#

and the other three numbers, or the vector, is the axis

kind herald
#

complex numbers*

harsh atlas
#

So are quaternions

kind herald
#

exactly

#

so are vectors

#

and matrices

#

well actually, my bad, they aren't systems exactly

harsh atlas
#

Vectors and matrices are completely different tho?

#

From quaternions and numbers

#

They're not number systems

kind herald
#

they are not number systems

harsh atlas
#

Quaternions are just like natural numbers and whole numbers and real numbers

kind herald
#

no they are not

harsh atlas
#

Yes they are

#

They are an extension

#

Of complex numbers, which are the extension of the real numbers

kind herald
harsh atlas
#

This is just how compsci uses it

#

Purely mathematically they are just numbers

kind herald
#

whoa wait

#

i just found

#

something

harsh atlas
#

Show

kind herald
#

that might prove you right

#

didn't read on it yet

harsh atlas
#

Quaternions are numbers

#

If speaking purely mathematically

#

And that's what I've been doing, I'm talking about pure mathematics

#

In compsci they're a bunch of different stuff

#

It's just funky numbers which are very cool

#

I should learn more about them

kind herald
#

nvm that article just said "quaternions are numbers" as a buzzword typa thing

harsh atlas
#

quaternions help describe rotation in 3d spaces

#

just help

kind herald
#

also, I wouldn't agree with you, event mathematically

#

because

#

no

#

they don't "help"

harsh atlas
#

they can be used to describe rotations in space

kind herald
#

where is that example

#

of that quaternion

harsh atlas
#

But what they are is numbers

kind herald
#

no

harsh atlas
#

Like unity?

kind herald
#

"They have the ability to uniquely describe any three-dimensional rotation about an arbitrary axis and do not suffer from gimbal lock."

#

so the number 90

harsh atlas
#

That's their ability

kind herald
#

what rotation is that

harsh atlas
#

No clue, convert from quaternions to euler angles

#

In unity

kind herald
#

they are exactly like vectors, which describe a point or direction in a space

kind herald
tiny plume
#

are we talking about abstract maths? i love abstract maths

kind herald
#

si

#

this dude

#

this bean

#

is telling me that quaternions are singular numbers

tiny plume
#

yes, they are

kind herald
#

like, 2190.0121 is a quaternion

harsh atlas
#

They are

harsh atlas
kind herald
#

i need explanations

harsh atlas
#

Ok so

tiny plume
#

perhaps not in the most literal sense, since we do encode a complex number as two real numbers (and a quaternion as four real numbers)

harsh atlas
#

2190.0121

#

Is just

tiny plume
#

think about how a rational number is a ratio of two integers

#

it has two numbers in it, I guess, but it's still a number

harsh atlas
#

2190.0121 + 0i + 0j + 0k

tiny plume
#

24/64 is a rational number

kind herald
#

you cannot "make" or compute should i say, a quaternion from a single number

harsh atlas
#

Just like 5 is 5.0000000

#

You can

#

It just wouldn't have an imaginary part

kind herald
kind herald
harsh atlas
#

That would be different from just 2190.0121

#

A different number

kind herald
tiny plume
#

no, a complex number is not a "number system"

harsh atlas
#

I think you misunderstand what a number is

tiny plume
#

it is an element in a number system

harsh atlas
#

Numbers go beyond just real numbers

tiny plume
#

"A number is a mathematical object used to count, measure, and label.", as per wikipedia's first paragraph on number systems

harsh atlas
#

And quaternions

#

Are used to measure rotation

kind herald
# tiny plume no, a complex number is not a "number system"

yes it is
"In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted i, called the imaginary unit and satisfying the equation i^2 = -1"
is has two parts
a real part and an imaginary part
2/8 is not a number system, therefore is a number, because it has only one real part

tiny plume
#

3blue1brown has some very nice videos talking about quaternions (and their applications for rotations)

kind herald
tiny plume
harsh atlas
#

Also 90 is a rotation of 0 according to the converter I found on the internet

tiny plume
#

2/8 is, indeed, not a number system, because it's a number

tiny plume
#

this has nothing to do with it only having one part, or only a real part

harsh atlas
tiny plume
#

a number is an element of a number system

harsh atlas
#

A number system is like

tiny plume
#

1 is a number because it is an element of the integers

harsh atlas
#

Whole numbers and Real Numbers

kind herald
#

2 + 1i is not a number, it's a number system, it belongs on the complex plane and was "misjudged" as an "imaginary" number for simplicities sake

tiny plume
#

the complex numbers are a number system

harsh atlas
#

Natural numbers, Whole numbers, Rational numbers, Real numbers, Complex numbers, Quaternion numbers

tiny plume
#

2 + 1i is a number in the complex number system

harsh atlas
#

From smallest to biggest up to wuaternions

#

I think I didn't miss anything at least 😓

kind herald
harsh atlas
#

90 is a quaternion

#

It's part of the number system of quarternion numbers

tiny plume
#

3 is a natural number, integer, rational number, real number, complex number, and quaternion number

#

it satisfies the rules for all of these number systems

kind herald
#

okay but then so are vectors? right?

harsh atlas
#

No

#

Vectors aren't a number system

tiny plume
#

indeed

#

perhaps the confusion comes from how you tend to store complex numbers as a Vector2 and quaternions as a Vector4

#

this is just an implementation detail

harsh atlas
#

Vectors are just a collection of numbers

tiny plume
#

it is the most convenient way to implement them on a computer

kind herald
#

great

#

which means

#

quaternions are not numbers either

harsh atlas
#

Which is helpful when you wanna store a quarternion since it has 4 variables

#

No

#

Quaternions are numbers

tiny plume
harsh atlas
#

You can conveniently store it in a vector but it is not one

kind herald
#

is this a vector

harsh atlas
#

Yes

#

But it's not a quarternion

kind herald
#

how many components/numbers does it have

harsh atlas
#

It's a rotation vector

#

It consists of 3 numbers

kind herald
#

correct

#

is this a quaternion

tiny plume
#

the distinction between "a complex number" and "a vector of two real numbers" is, indeed, down to semantics

kind herald
#

how many components/numbers does it have

harsh atlas
#

It's a vector representing a quaternion

#

Just representing

#

What this actually is is

#

0i + 0j + 0k + 1

#

You can just store the values in a vector for convenience

#

Which is what programmers do

#

I imagine it would be pretty hard to store a quarternion in anything but a vector for programmers

kind herald
#

I had to pull out the big guns

harsh atlas
#

Chat GPT

#

Opinion invalidated

tiny plume
#

this is nonsense

harsh atlas
#

Also it literally says it's a number!

tiny plume
#

i was hoping to have an interesting discussion in here, but i'm obviously just being trolled

harsh atlas
#

I just said a funny thing I realized

#

It is funny tho

kind herald
#

what

#

i didn't get a single source that confirms your information and you are the one getting trolled 💀

#

i had to resort to ai, yes, it's funny

harsh atlas
#

"a quaternion cannot be represented as a single number"
"a quaternion is a number.."

#

It's dropping the "real"

#

And even then it's wrong

#

A quarternion is a 4 dimensional number

#

This is what it's right about

#

It's a number

#

In 4 dimensions

#

x y z and w

kind herald
#

so is a vector

#

it's a number too then

#

because it represents a singular point in those dimensions

harsh atlas
#

No for god's sakes!

#

"In mathematics, the quaternion number system extends the complex numbers."

#

A vector is a bunch of numbers

#

A quarternion is one number with a bunch of variables

#

A vector is not one number
A quarternion is one number

#

One can be represented with another, but just represented

kind herald
#

i used wolfram alpha to compute a quaternion

harsh atlas
#

See? A number

kind herald
#

...

#

it's the norm

#

like a magnitude

#

in a vector

harsh atlas
#

You're misunderstanding the meaning of "number"

#

Numbers go beyond real numbers

kind herald
#

no no

#

don't change the topic

#

"single number"

#

that's what you said

harsh atlas
#

The norm is just the geometrical mean pretty sure

kind herald
#

as in, it does not have to be written as a function but a single number

harsh atlas
#

It just squares all the components, adds them up and sqrts them pretty sure

#

Well yes

kind herald
#

yes

#

just like the vector's magnitude

harsh atlas
#

2 + i - 2j + 5k is one number

#

It has no variables

kind herald
#

except it does
the 0 before i
the 2 before j
and the 5 before k

#

those are variables, because they vary

#

so is the 2

harsh atlas
#

So does 2x + 3y

kind herald
#

exactly

harsh atlas
#

It's still one number except that one has variables

kind herald
#

and what is that?

harsh atlas
#

You literally put them in

#

It'd be a variable if it was w + xi + yj + zk

#

But then you put in 2 instead of w, 1 instead of x, -2 instead of y and 5 instead of z

#

It's now not a variable because you put them in

#

It became a constant

#

And i j and k are not variables

harsh atlas
kind herald
#

they are also constants yea

harsh atlas
#

It's a single number

kind herald
#

but a quaternion is a single rotation along an axis by a certain amount of degrees

#

meaning, it consists of a vector
and a real number

harsh atlas
#

A quarternion is a 4 dimensional number that can represent rotation

kind herald
#

well not really a vector but yea

harsh atlas
#

It represents rotation

#

It's not rotation

#

It just represents and has the ability to do so

#

Just like complex numbers have the ability to represent alternating current

#

But you wouldn't call 2 + 4i "just alternating current" or wtv

#

That's applied mathematics

#

In pure mathematics which is again, what I'm talking about

#

A quarternion is one 4 dimensional number

kind herald
#

define a vector then

#

a vector is 3 1d numbers?

harsh atlas
#

Just a bunch of numbers

kind herald
#

WELL

harsh atlas
kind herald
#

sorry caps

#

it can be anything yea

harsh atlas
#

It's multiple numbers

kind herald
#

ye

#

x 1d numbers

harsh atlas
#

Tbf can't you like

#

Imagine putting a quarternion into a vector

kind herald
#

interesting

#

a vector holds numbers

harsh atlas
#

Yes

kind herald
#

like an array

harsh atlas
#

So you can put any number

#

OH YEAH

kind herald
#

but a quaternion "computes" it

harsh atlas
#

A vector is just an array

#

?

kind herald
#

well

harsh atlas
#

Wdym computes it

kind herald
#

it's like

#

i have no idea how to say it

harsh atlas
#

A vector is an array a matrix is an array of arrays of sorts

kind herald
#

but it is sort of

#

a single number

#

now that i think about it

harsh atlas
#

Quaternion? Yeah

kind herald
#

but nah

#

cant be

harsh atlas
#

Stage 1, denial

kind herald
#

i crave concrete evidence

#

ill continue searching about it

harsh atlas
#

Good luck

harsh atlas
#

There are a lot of them

#

Very useful numbers

#

Google "quaternions in pure mathematics" you should find something

#

Good luck

kind herald
#

if you are still here

#

did we say, complex numbers are numbers? or did we say something else

harsh atlas
#

Quaternions are an extension of them

#

I mean they are literally called complex numbers

kind herald
#

but no no

#

wait

harsh atlas
#

are you still here?..

kind herald
#

a quaternion rotates a 3D point in space in regards to the origin
mathematically that means that it rotates a 3D direction (since a direction is already sort of defined by a origin, or usually, it's considered to be (0, 0))
meaning that you need the quaternion form to output a 3D point, which is a vector, which we said is not a number
meaning that a quaternion mathematically results in a vector of size of 3
a quaternion cannot output/result in a single number because that would mean you can get a vector (or compute a vector) from a single number

expanding on the wikipedia article (yea i know, not the greatest source):
https://en.wikipedia.org/wiki/Quaternion#:~:text=A quaternion is an expression of the form

In the picture below, i,** j** and k are unit vectors

Unit vectors: https://en.wikipedia.org/wiki/Unit_vector#:~:text=In mathematics%2C a,pronounced "v-hat"

Furthermore
Hamilton describes a quaternion q = a + bi + cj + dk as consisting of a scalar part and a vector part where the latter is sometimes called as the imaginary part.

This part right here took A LONG LONG TIME
"More properly, the field of real numbers is isomorphic to a subset of the quaternions. The field of complex numbers is also isomorphic to three subsets of quaternions."
The field of real numbers being the a, b, c and d

In mathematics, a unit vector in a normed vector space is a vector (often a spatial vector) of length 1. A unit vector is often denoted by a lowercase letter with a circumflex, or "hat", as in

            v
          
          ^

...

In mathematics, the quaternion number system extends the complex numbers. Quaternions were first described by the Irish mathematician William Rowan Hamilton in 1843 and applied to mechanics in three-dimensional space. Hamilton defined a quaternion as the quotient of two directed lines in a three-dimensional space, or, equivalently, as the quotie...

#

i was writting all of this

#

for nothing

#

"More properly, the field of real numbers is isomorphic to a subset of the quaternions. The field of complex numbers is also isomorphic to three subsets of quaternions"

#

which means

harsh atlas
#

that's how it can be represented and used

kind herald
#

" the field of real numbers is isomorphic to a subset of the quaternions, what we mean is that there is a one-to-one correspondence between the two systems. Specifically, every real number can be represented as a quaternion of the form a + 0i + 0j + 0k. This means that the real numbers and a subset of the quaternions have the same structure, even though the individual elements are different."

#

which means

harsh atlas
#

it can be used to rotate a point

kind herald
#

quaternions

#

can be

#

single numbers

#

goddamn

harsh atlas
#

they always are

kind herald
#

this was a ride

harsh atlas
#

they're one number

#

with like

kind herald
#

i mean sure

harsh atlas
#

yea

kind herald
#

but yea

#

they are one number

harsh atlas
#

but real numbers are also quaternions

kind herald
#

they can just be written as a "function"

harsh atlas
#

just like whole numbers are also rational numbers

harsh atlas
kind herald
#

isomorphism is fun

harsh atlas
#

no clue what that even means lmao

#

but glad you proved it to yourself

kind herald
#

yea thanks

harsh atlas
#

quaternions are fun little numbers

kind herald
#

"In mathematics, an isomorphism is a structure-preserving mapping between two structures of the same type that can be reversed by an inverse mapping."

#

basically, "equal" things

harsh atlas
#

damn that makes no sense but sounds fun UnityChanThumbsUp

#

but makes sense kinda

kind herald
#

holy shiiit

#

more stuff

#

a vector can also be represented as a quaternion

#

which is so counterintuitive, but WHAT DOES IT MEAN

harsh atlas
#

it's very funny

kind herald
#

does that mean that a quaternion is both a single scalar value and a vector at the same time?
because, saying that it can be represented as both is ambigous, so shouldn't quaternions just be quaternions? just like vectors are vectors or arrays, single numbers are scalars or values? can't quaternions be classified more correctly as rotations or instructions of some sort?

harsh atlas
#

or smth my brain is not working anymore

#

in pure maths theyre nothing but numbers

kind herald
#

but a quaternion can equal its vector part
"Hamilton describes a quaternion q = a + bi + cj + dk as consisting of a scalar part and a vector part where the latter is sometimes called as the imaginary part."

#

"More properly, the field of real numbers is isomorphic to a subset of the quaternions. The field of complex numbers is also isomorphic to three subsets of quaternions"

harsh atlas
#

vector part is just the imaginary part

kind herald
#

subset of the quaternions are isomorphic or equal to the field of real numbers
while three subsets are equal to the field of complex numbers

kind herald
harsh atlas
#

unit vectors?

kind herald
#

yes

harsh atlas
#

ok im gonna be honest

#

i do not understand anything my brain is not working rn

kind herald
#

i is the "x"
j is the "y"
k is the "z"
in other words i can be written as (1, 0, 0), j as (0, 1, 0) and k as (0, 0, 1)
the numbers before are the "amount" of how much each of those "axis" are influencing the rotation

harsh atlas
#

ye but it's how it can be used

#

not what it is

kind herald
#

no, they specifically are, and must be, vectors

#

they "usually" are unit vectors

harsh atlas
#

but quaternions themselves have nothing to do with rotation

#

this is like computer science and physics and all that

#

purely mathematically there is no connection i think???

#

ok can we actually end this discussion

kind herald
#

yes we can

#

but, it's more complicated than both of us thought is all I'm going to add
there are both scalar (single number) and vector quaternions