How to resolve the algorithm Vector products step by step in the EchoLisp programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Vector products step by step in the EchoLisp programming language
Table of Contents
Problem Statement
A vector is defined as having three dimensions as being represented by an ordered collection of three numbers: (X, Y, Z). If you imagine a graph with the x and y axis being at right angles to each other and having a third, z axis coming out of the page, then a triplet of numbers, (X, Y, Z) would represent a point in the region, and a vector from the origin to the point. Given the vectors: then the following common vector products are defined:
Given the three vectors:
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Vector products step by step in the EchoLisp programming language
Source code in the echolisp programming language
(lib 'math)
(define (scalar-triple-product a b c)
(dot-product a (cross-product b c)))
(define (vector-triple-product a b c)
(cross-product a (cross-product b c)))
(define a #(3 4 5))
(define b #(4 3 5))
(define c #(-5 -12 -13))
(cross-product a b)
→ #( 5 5 -7)
(dot-product a b)
→ 49
(scalar-triple-product a b c)
→ 6
(vector-triple-product a b c)
→ #( -267 204 -3)
You may also check:How to resolve the algorithm RIPEMD-160 step by step in the FreeBASIC programming language
You may also check:How to resolve the algorithm Jacobi symbol step by step in the Mathematica / Wolfram Language programming language
You may also check:How to resolve the algorithm FizzBuzz step by step in the Oz programming language
You may also check:How to resolve the algorithm Bitcoin/public point to address step by step in the Common Lisp programming language
You may also check:How to resolve the algorithm Magic squares of odd order step by step in the C programming language