Geometric Algebra in 2D - Vector Projection and Reflection

Поділитися
Вставка
  • Опубліковано 10 гру 2024

КОМЕНТАРІ • 82

  • @pythagorasaurusrex9853
    @pythagorasaurusrex9853 7 років тому +18

    It is great to watch how geometric algebra forms a bridge between vector geometry, quaternions and complex numbers. This is awesome!

    • @miroslavjosipovic5014
      @miroslavjosipovic5014 5 років тому +10

      You can add spinors, tensors, hyper.complex numbers, dual numbers..., you name it. In fact, geometric algebra is so powerful that it will prevail in future.

    • @Matthew-by2xx
      @Matthew-by2xx 4 місяці тому

      @@miroslavjosipovic5014Geometric algebras are constructed from the tensor algebra, so idk about all that.

  • @milandavid7223
    @milandavid7223 3 роки тому +7

    6:13 An observation I would attach here is that the inverse of u, u/(|u|^2) could be written as (u/|u|)/|u|, which is the normal of u divided by its magnitude. So we take the inverse of u's length, and point it in the direction of u.

    • @erykpakula
      @erykpakula Рік тому +1

      it's similiar to x^-1 = (1/|x|) * sgn(x) in real
      signum tells us about direction in real numbers axis and versor about direction in space

  • @wyboo2019
    @wyboo2019 Рік тому +3

    answer for the end: since reflection doesn't change the magnitude of a vector, it's just a rotation of u. reflecting u over v just rotates u by double the angle between u and v, then reflecting this over a new vector w just rotates by double the angle made between v^-1uv and w, so overall u gets rotated by double the angle made between v and w

  • @splitzerjoke
    @splitzerjoke 7 років тому +18

    Fantastic stuff! It's almost magical to see these simple formulas come out of such an intuitive theory. Keep up the good work!

    • @VivekSingh-nt2zv
      @VivekSingh-nt2zv 2 роки тому

      ua-cam.com/video/0VmZ5yK9TPY/v-deo.html&ab_channel=Sunyamekam

  • @ef2b
    @ef2b 3 роки тому +6

    In the reflection operation, v^-1 u v, it is interesting to note that since v^-1 is v/||v||^2, we can put one of the ||v|| with v^-1 and the other with v on either side of the u. But, v/||v|| is just a unit vector in the direction of v and we know that unit vectors are their own inverses. Let me write e_v to mean a unit vector in the direction of v. The reflection formula then becomes e_v u e_v. You showed that a geometric product is a scalar plus a bivector. It is interesting to recognize that the scalar part of u e_v is the length of the projection of u along v and the magnitude of the bivector is the magnitude of the perpendicular component of u to v.
    Regarding your final question, if (vw)^-1 is w^-1 v^-1, then the final computation says that we think about reflecting a vector across a bivector. Geometrically, I suppose that means reflecting across one leg of the parallelogram followed by reflecting about the other. This stuff is pretty neat! Thank you for posting these.

  • @zlatanbrekke6538
    @zlatanbrekke6538 2 роки тому

    Insane, so much linear algebra, complex numbers, spinors, quaternions, and so much more that just comes natural with geometric algebra.

  • @spgcode7971
    @spgcode7971 7 років тому +24

    It's funny how it looks crazy at first and then everything just works out in the end.

    • @Math_oma
      @Math_oma  7 років тому +2

      +SPGcode
      Yes, and totally naturally.

    • @JobvanderZwan
      @JobvanderZwan 7 років тому +5

      Most mathematics is like that, kinda like a detective novel with all kinds of weird threads that all get connected and resolved at the end of the story.

    • @VivekSingh-nt2zv
      @VivekSingh-nt2zv 2 роки тому

      ua-cam.com/video/0VmZ5yK9TPY/v-deo.html&ab_channel=Sunyamekam

  • @michaeledwardharris
    @michaeledwardharris Рік тому +1

    This series is absolutely excellent. Thanks for making these.

  • @spicemasterii6775
    @spicemasterii6775 8 років тому +4

    Fantastic video! Clear explanation. Thank you for taking the time to make them. You make it intuitive and easy to understand.

    • @Math_oma
      @Math_oma  8 років тому +2

      +Clove Cinnamon
      Thanks!

  • @blu12gaming44
    @blu12gaming44 7 років тому

    Also: at 11:45, the vectors are displayed in such a way that they closely resemble the Radius and Secant components of the Extended Unit Circle. So with that in mind: a vector that would connect the terminating ends of 'u' and 'v' would be equal to
    |u| |v| tan(theta). Which provides a very interesting insight into the nature of Vector Addition/Subtraction, as the previously mentioned vector would typically be described by those means.

    • @blu12gaming44
      @blu12gaming44 7 років тому

      Provided that 'v' is equal to |u| sec(theta) I think.

  • @aleclarsen7434
    @aleclarsen7434 8 років тому +3

    Thank you so much for taking the time to make these videos. I am really enjoying them.

    • @Math_oma
      @Math_oma  8 років тому +1

      +Alec Larsen
      You're welcome. Let me know if you have any questions.

  • @erickweil4580
    @erickweil4580 3 роки тому

    Very well presented, finally I come across someone who actually explains the notations.
    I went and implemented in python a program that generates the multiplication table for a given number of dimensions, and is able to compute the geometric product following these rules. Actually I'm generating the formulas for transformations in 4D euclidean space that way. the subspace in 4D is [1, X, Y, Z, W, YZ, ZX, XY, XW, YW, ZW, XYZ, XYW, XZW, YZW, XYZW]
    Then went in and pluged the a . b = 0.5 * (ab + ba) and a ^ b = 0.5 * (ab - ba)
    but if I use those formulas with a bivector [YZ,ZX,XY,XW,YW,ZW] the wedge product of two bivectors give another bivector, while the dot product of two bivectors give a scalar and a XYZW, and finally the geometric of the two product gives a scalar, another bivector and a XYZW part.
    The ab = a . b + a ^ b still holds but made me wonder how can the dot procut give anything other than a scalar.

    • @angeldude101
      @angeldude101 2 роки тому

      That's mainly because the standard definitions of the dot and wedge product are slightly different than those formulas. The standard definition is to just say that the dot product always has a grade of the difference of the inputs, while the wedge product has the sum of the input grades. For vectors, this aligns with the formulae given here, though for a vector * bivector, their flipped, so the dot product, which gives a vector, is now anticommutative, while the wedge product, which gives a trivector, is commutative. Between two bivectors, the dot product is commutative and gives a scalar as it always does for two objects of the same grade, while the wedge product give a 4-vector, but is also commutative as well. For bivectors, a common operation is the commutator product (which looks and acts like the cross product). The commutator product is 0.5 * (ab - ba) regardless of its inputs, and for two bivectors it gives another bivector (just like the cross product should).
      In math terms:
      a · b = ₖ where k is |grade(a) - grade(b)|
      a ∧ b = ₖ where k is grade(a) + grade(b)
      a × b = ½(ab - ba)
      (ₖ = the grade k part of a)

  • @ronnysanjaya6823
    @ronnysanjaya6823 Рік тому

    Wonderful .many thanks for this description.

  • @MissPiggyM976
    @MissPiggyM976 10 місяців тому

    The best videos on PGA !

  • @HotakaPeter
    @HotakaPeter Рік тому

    I have a problem at 22:32 calculating reject(u,v) = scalar_multiply(wedge(u,v),vector_inverse(v)). If we calculate wedge(u,v) using the determinant rule we get (1*0)-(1*2) = -2. This negative wedge product causes the result to point the wrong way. Where am I going wrong?

  • @Hoo-Dat
    @Hoo-Dat Рік тому

    The part that I would really like explanation on is that just because they are parallel, does not in my mind mean that the geometric product commutes, because it could be parallel in the opposite direction, which (if I’ve learned this so far correctly) would be like e^(x) uv e^(x) where x appropriately produced a 180

  • @siratmohaiminulislam8677
    @siratmohaiminulislam8677 7 років тому +2

    u saved my life man! I found the exact explanation I was looking for! Thanks a ton :-)

  • @pythagorasaurusrex9853
    @pythagorasaurusrex9853 7 років тому

    Great videos! Kick all lectures in university in the bowl. Your series of explaning G(R2) is the best I have experienced so far. That here is all one needs. Thanks! You have a new subscriber.

  • @tomaszgruszka3845
    @tomaszgruszka3845 2 роки тому +1

    24:48 I have a question. So I solved this myself, by writing u' = u|| - u|_ like you did. But I used the u|| and u|_ formulas derived previously in the video, and I got u' = (u*v)v^-1 - (u A v)v^-1. Then I factored out v^-1 on the right hand side, and I got u' = (u*v - u A v)v^-1. By anti-commutativity of wedge product, and commutativity of a dot product, u' = (v*u + v A u)v^-1, and by definition of a geometric product u' = vuv^-1, which is the exact opposite order to what you got. Is my solution equivalent somehow to yours? Or is it wrong, and I made an assumption I shouldn't be making?

  • @Alannnn14
    @Alannnn14 3 роки тому

    If U = U(para) + U(perp)
    and U (para) = ( U . V ) V^-1
    U (perp) = ( U /\ V ) V^-1
    U = ( U . V ) V^-1 + ( U /\ V ) V^-1
    If we do the geometric product with v on the left we get the identity
    UV= ( U . V ) + ( U /\ V )
    Thats very intuitive!

  • @ClydeCoulter
    @ClydeCoulter 2 роки тому

    At 22:11, wouldn't "(e1 + e2)^2e1)" become (e2^2e1)? Where, what you did with canceling the 2 made it come out right?

  • @MultivectorAnalysis
    @MultivectorAnalysis 8 років тому +1

    Are you planning to do G(3) examples next? Perhaps reflection and rotation applications with versors and rotors (i.e. the even verors)? With a 3-dim vector space you can really see why the "sandwich" product is introduced. This video seems to be setting that up nicely.

    • @Math_oma
      @Math_oma  8 років тому

      +Nick Okamoto
      Yeah, I was going to start talking about G(3) in a video or two but I thought I'd cover a few little applications (like the trig video) before moving on to that, just to show how nice the GA concepts are.

  • @binarybob0010
    @binarybob0010 7 років тому

    Great video. I was taking notes and working ahead. Please correct me if I'm wrong, but I believe I found a slightly different form for the rejection formula. I used the previous derivations for u-parallel and u-perpendicular, substituted, and simplified as follows.
    u-reflected = (u.v)v^-1 - (u*v)v^-1 = (u.v - u*v)v^-1 = (v.u + v*u)v^-1 = vuv^-1. This actually checks out! Let v^-1uv = vuv^-1, then uv=vvuv^-1, then uv=(|v|^2)uv^-1. Since v^-1 = v/|v|^2, we have uv^-1 = uv^-1.

  • @Humza_3.14
    @Humza_3.14 5 років тому +6

    Solution to the challenge problem: A sum of reflections is a rotation?

  • @blu12gaming44
    @blu12gaming44 7 років тому +1

    Thank you very much for the great tutorials!! Also, at 10:20, the derived formula definitely resembles the Product to Sum Formulas. I haven't taken a course in Linear Algebra yet, but is there a connection with those two formulas?

    • @miroslavjosipovic5014
      @miroslavjosipovic5014 5 років тому

      If I understand your question correctly, there is a connection. In geometric algebra we have objects that square to -1, 0, and 1, which means that we can use series expansion to define functions, like sin(e1).

  • @francescorizzi2601
    @francescorizzi2601 3 роки тому

    Hi Mathoma, i'm trying to understand geometric algebra for my graphics engine.
    I really love this stuff and you explain it very clearly but I'm struggling to understand how one can compute formula : e1 ( e1 + e2) (minute 28:23)
    What is the operation between e1 and (e1 + e2) ? Is it geometric product? How can this be computed by a computer program?

    • @davidste60
      @davidste60 3 роки тому

      You need a data structure with .scalar .e1 .e2 .e1e2 members (for a 2d game). Then if you want the geometric product of 0,2,0,0 with 0,3,0,0 for example, it would go into the .scalar part, giving 6,0,0,0. This is because e1 * e1 = 1 and 1 is a scalar quantity. You need to include the other properties into your geometricProduct method too, like e1e2 * e1e2 = -1, e1e2 = - e2e1 etc. If you want high performance you will need to do some metaprogramming, otherwise there will be lots of unnecessary instructions happening (especially in 3d, where there are 8 members of the data structure, and more relationships between them).
      EDIT: Then one of the most important uses in a game would be that the GP of two vectors ({0,something, something, 0} * {0,something,something,0}) results in {something, 0, 0, something}. The scalar (first member) part of the result corresponds to the real part of a complex number and the "pseudo-scalar" (e1e2, the fourth member) part corresponds to the imaginary part of the same complex number. Just like using complex numbers, the GP of a vector {0, something, something, 0} with one of these results ({something, 0, 0, something}, called a rotor}) performs rotation. But it rotates by twice the angle between the orginal two vectors that were used to make the rotor. The scalar part results from the dot product and the pseudo-scalar part results from the wedge product (ab = a.b + a^b). This relationship to the complex numbers makes sense if you remember that a.b = |a||b|cos(theta) and a^b = |a||b|sin(theta)e1e2 (and e1e2 is equivalent to the letter I). A similar situation occurs in 3d, relating a rotor, the GP of two 3d vectors, to quaternions, with the scalar part being the cosine part and the 3 bivector parts e1e2, e2e3, e1e3 all being sine parts, and all squaring to -1. Again GP of a 3d rotor and a 3d vector gives you the vector rotated by twice the angle between the vectors that were GP'd to create the rotor. I wish this was explained to me, in terms of data structures and operations, when I was first learning about Geometric Algebra.

  • @MrKlixon
    @MrKlixon 4 місяці тому

    AAAAAh i can finally follow along with e1.dot(e2) == 0 and e1.wedge(e2) == 1 feeling somewhat familiar. Such many symbols :s (yes, this is my second time watching the full series :D)

    • @MrKlixon
      @MrKlixon 4 місяці тому

      AND you have to factor out to the proper side... I might have to watch this whole series a few more time, but things are starting to make sense beyond the level of "it's magics"

    • @MrKlixon
      @MrKlixon 4 місяці тому

      🙃 It actually feels like I'm getting there, thank you!

  • @陈一-y6x
    @陈一-y6x 4 роки тому +2

    I have watched your video, it's really great. At the same time, I want to ask you a question that how can we use geometric algebra therom in computer with some scientific softwares, such as matlab? I hope you can give me some advise for this question. Thanking for you help!

  • @BigDBrian
    @BigDBrian 7 років тому +1

    If you reflect something once, you get a mirror image, but if you reflect something twice, you get the original, just not necessarily in the same rotation.
    So... doing two reflections is a rotation.
    However... since there's technically no distinction between a vector and it mirrored (such as there is with a shape), I'd argue just one reflection is a form of rotation in 2D

    • @miroslavjosipovic5014
      @miroslavjosipovic5014 5 років тому

      Yes, there is a theorem about it.

    • @finwefingolfin7113
      @finwefingolfin7113 4 роки тому

      That's true for 2 dimensions but the double reflection formula becomes important in higher dimensions.

  • @pedroth3
    @pedroth3 4 роки тому +2

    I think there is an error In the rejection formula.
    Since uv - vu =2 * u ^ v
    Then the rejection o u should be:
    Rej(u) = (uv - vu)/v
    Rej(u) = 2(u^v)/v
    Sorry If I am being pedantic, great admirer of your videos. Thanks

    • @APaleDot
      @APaleDot 4 роки тому +2

      17:53
      I think you misread the screen here. The line on the bottom says:
      Rej(u) = (uv - u·v)/v
      not
      Rej(u) = (uv - vu)/v

  • @OwenKraweki
    @OwenKraweki 2 роки тому

    Is uv in the formula for a reflected vector (u' = v^(-1)uv) a dot product or a geometric product? And if it is a geometric product, how do I compute the wedge product?

    • @angeldude101
      @angeldude101 2 роки тому

      Geometric product. The wedge product is just gotten by whatever terms of the geometric product have a higher grade. (u₁e₁ + u₂e₂)(v₁e₁ + v₂e₂) = u₁v₁e₁e₁ + u₁v₂e₁e₂ + u₂v₁e₂e₁ + u₂v₂e₂e₂ = (u₁v₁ + u₂v₂) + (u₁v₂ - u₂v₁)e₁e₂. The second term is the wedge product, and the first is the dot product. All you really need to know when expanding is that like basis vectors reduce to 1, while unlike basis vectors anti-commute in order to add together. e₁e₁ = e₂e₂ = 1, e₁e₂ = -e₂e₁.

  • @rweaver6
    @rweaver6 10 місяців тому

    Something's missing. The reals are normally treated as a subset of the complex. What you're saying is that you have to add in two more dimensions e1 and e2, before you can make sense of the imaginary dimension I . That's not exactly simpler than just doing algebra with X=a+ib . The complex numbers are a field, where multiplication is commutative, so the equation X^2+X+1=0 can be solved without non-commutative gymnastics and by reference to only the real and imaginary dimensions.
    To put it another way, can you teach Clifford R^2 algebra to the average high-schooler, or is she better off accepting i^2=-1 , and what follows from that, in two dimensions, not four?

  • @cristian-bull
    @cristian-bull 4 роки тому

    For U' , my answer is all swapped, is there any mistake?
    U' = Uparallel-Uperp = (U*V)V_1 - (U^V)V_1 = (U*V-U^V)V_1 = (V*U + V^U)V_1 = VUV_1
    Edit: wait, the difference between V and V_1 is a constant. The order doesn't even matter, does it ._.

  • @porky1118
    @porky1118 7 років тому +2

    I watch something about u v and v u on my Wii U ^^

  • @mirkodobrota4861
    @mirkodobrota4861 Рік тому

    HI, you have uv-uv in par. 17.53 min, and u wrote it is u ^ V. it should be uv-vu, and where is 1/2?

  • @MS-sv1tr
    @MS-sv1tr Рік тому

    (vw)(w^-1)(v^-1) = v(ww^-1)v^-1 = vv^-1 = 1
    (vw)^-1 = (w^-1)(v^-1)
    (w^-1)(v^-1)u(vw) = ((vw)^-1) u (vw) = e^(-i*theta) u e^(i*theta)
    Where theta = angle between v and w
    So this corresponds to a rotation of u by 2*theta
    I think that's right

  • @yizhang7027
    @yizhang7027 3 роки тому

    How do you distinguish u dot v from bivector uv?

    • @ToranSharma
      @ToranSharma 3 роки тому

      Taking u and v to be vectors, u·v is a scalar, while the geometric product uv is a multivector. By the definition of the geometric product, this multivector is namely the sum of u·v (a scalar) and u∧v (a grade-2 bivector).
      If u and v are not necessarily vectors, but arbitrary elements of the geometric algebra, i.e. multivectors, their product will in general also be a multivector with a scalar, vector and bivector component.

  • @TheMasterfla10
    @TheMasterfla10 6 років тому

    I don't understand the formula "(u.v)v^-1", what will be the result of the geometric product of a vector and a scalar ?

    • @Math_oma
      @Math_oma  6 років тому +1

      +master psp
      That's simply a scalar multiple of the vector v^-1 namely u.v - you take u.v get a scalar, and scale the vector, v^-1, by that.

    • @TheMasterfla10
      @TheMasterfla10 6 років тому

      ​@@Math_oma In the derivation of the formula at 14:48, you "multiplied" both sides of the equation by v^-1, the geometric product of v and v^-1 is 1. But, on the left hand side, the operator is not the usual multiplication, is the geometric product. So the geometric product can also scale vectors ?

    • @Math_oma
      @Math_oma  6 років тому +1

      @@TheMasterfla10 There might be some abuse of notation there, but you can see the result is correct just by substitution into the previous line in the derivation.

    • @miroslavjosipovic5014
      @miroslavjosipovic5014 5 років тому

      There are some rules about an order of multiplication. The geometric product is to be executed last. But here we have parentheses...

    • @miroslavjosipovic5014
      @miroslavjosipovic5014 5 років тому

      @@TheMasterfla10 It is ok to write 3 e1, u.v is a scalar, therefore, there is no problem here.

  • @zairaner1489
    @zairaner1489 7 років тому

    You are saying everything has an inverse. but for that 1 must be a neutral element. But right now, I don't see what 1*u even means in most cases (what is 1 dot e1 for example? what is 1 wedge e1?)

    • @Math_oma
      @Math_oma  7 років тому

      +Raphael Schmidpeter
      The dot product and wedge products between scalar and vector weren't defined in this video. Of course, the geometric product 1u=u is obvious and that's all that's needed and in general a scalar times a vector under the geometric product scales the vector as you think it would.
      I guess one could talk of the dot product and wedge products between scalar and vector but it's not too interesting because the geometric product between scalar and vector only has a grade-1 part. Contrast that to the geometric product between two vectors, which splits into a grade-0 part (the dot product part) and a grade-2 part (the wedge product part). There we could just define the dot product to be the lowest grade element and the wedge product to be the highest grade and we could do the same for the scalar-vector product - but here the lowest grade and highest grade happen to be the same thing. So, 1.e1 = 1 ^ e1 = e1. Notice that it's no longer true that 1u=1.u + 1^u like the related formula for vector-vector products, that's just a special feature of the vector-vector geometric product.
      You should think of the geometric product as most fundamental and basing all other operations off that one even though that's not how I introduced it in this video because I wanted this to be a very intuitive introduction to the geometric product.

    • @Math_oma
      @Math_oma  7 років тому

      +Raphael Schidpeter
      Also, there are many subsidiary operations one could define based on the geometric product like contractions and scalar product but, again, the geometric product is most fundamental.

    • @miroslavjosipovic5014
      @miroslavjosipovic5014 5 років тому

      First, there are objects in geometric algebra without an inverse. For example, try to find inverse of 1+e1. Second, there are problems with some derived products (such as dot product) and scalars, but there is a way to avoid such problems: we can define the left contraction, it removes all problems with scalars. There is no problem with the wedge product and scalars.

  • @ghewins
    @ghewins 3 роки тому

    Early on you state that a scalar is defined solely by its magnitude. If this were true, how would you distinguish between 1 and -1?

    • @okuno54
      @okuno54 3 роки тому

      Well, the magnitude of 1 is 1, and the magnitude of -1 is -1... so what's the question?

    • @ghewins
      @ghewins 3 роки тому

      @@okuno54 By definition, magnitude is either 0 or a positive real number

  • @sin_tel
    @sin_tel 8 років тому +1

    It's a rotation!

    • @Math_oma
      @Math_oma  8 років тому

      +Sintel
      Good. But, by what angle? Do you have an argument to show that this is true?

  • @HearTruth
    @HearTruth 8 років тому

    thank you.. show me more.. 3 6 9

  • @keeperofthelight9681
    @keeperofthelight9681 Рік тому

    There’s error at 14:00 you should get uv+vu =0 not 2u||v

  • @jeromesaint1735
    @jeromesaint1735 3 роки тому +1

    next time make a practical example