+ Reply to Thread
Results 1 to 6 of 6

calculating cross product using two vectors A and B

  1. #1
    Registered User
    Join Date
    10-15-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    13

    calculating cross product using two vectors A and B

    Hello

    I have to calculate cross-product of two vectors A=(1,2,3) and B=(4,5,6)

    I searched through internet trying to find a way to do it but I had no idea what they were saying because I am pretty new to vba.

    Could anyone help me how to calculate that simply?

    Thank you

  2. #2
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: calculating cross product using two vectors A and B

    Hi, This code may help you. A vector is stored in a() and B vector is stored in b()

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-15-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: calculating cross product using two vectors A and B

    Hello Sindhus
    Thank you for the code.

    However, when i put the code you wrote it gave me the number 90...

    I wrote this code before writing yours down

    Please Login or Register  to view this content.

    I found out that cross product of A(1,2,3) and B(4,5,6) is (-3,6-3)

    What did I do wrong in the code?? THank you
    Last edited by Cutter; 10-16-2012 at 12:31 PM. Reason: Added code tags

  4. #4
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: calculating cross product using two vectors A and B

    I have used the formula A(1)*B(1)+A(1)*B(2)+A(1)*B(3)+A(2)*B(1)+A(2)*B(2)+A(2)*B(3)+A(3)*B(1)+A(3)*B(2)+A(3)*B(3) to calculate cross product. What should be the formula?

  5. #5
    Registered User
    Join Date
    10-15-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: calculating cross product using two vectors A and B

    When I was surfing on the internet I saw

    given two vectors a and b:
    a = (1,2,3)
    b = (4,5,6)

    vector c can be computed:
    c = [(2*6)-(3*5)]i - [(3*4)-(1*6)]j + [(1*5)-(2*4)]k
    = [12-15]i - [12-6]j + [5-8]k
    = [-3]i - [6]j + [-3]k
    = (-3,6,-3)

    Since I just started learning all of these, I am kind of confused...

  6. #6
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: calculating cross product using two vectors A and B

    Try this code.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1