HP Forums
Cross in Matrix - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Cross in Matrix (/thread-2297.html)



Cross in Matrix - nakjaen - 10-15-2014 06:52 PM

How i can input a matrix and have a cross product?

ex.
i j k
2 3 1
1 2 3

and i need a det.
solution: 1i + 2j +3k


my hp prime say error when i input Cross( M1 )
M1= i j k
2 3 1
1 2 3


in hp50g is easy but here Confused


RE: Cross in Matrix - Han - 10-15-2014 08:48 PM

cross() takes two vectors and computes the cross product; one way to do this is to compute the determinant of the matrix you described. So if you already have the matrix, you want to use the det() command

So either use:

cross([2,3,1],[1,2,3]) to get [7 -5 1] or use
\[ \mathrm{det}\left( \left[
\begin{array}{rrr}
i & j & k \\
2 & 3 & 1\\
1 & 2 & 3
\end{array}
\right] \right) \]
to get \( 7\vec{i} - 5\vec{j}+\vec{k}\)


RE: Cross in Matrix - mlpalacios8 - 10-16-2014 01:48 AM

Handling matrixes is more efficient in the Prime than in the 50g.

I recommend you to use CAS and the matrix templates.

Put the command and then manually enter the matrix using the matrix template (1st row, last column).
The comma button serves as a "next column".

This is very helpful to solve linear system of equations too (inverse coefficient matrix * contant matrix, RREF command, etc).

After a couple of minutes, you will see how efficient the Prime is with matrixes thanks to the big touchscreen.


RE: Cross in Matrix - rgallier - 06-23-2015 01:59 AM

Why does
det( [ [ i j k ] , [ 2 3 1 ] , [ 1 2 3 ] ])
return
-6.48*j+2.04*k-0.24*i
instead of
-0.24*i-6.48*j+2.04*k


RE: Cross in Matrix - Joe Horn - 06-23-2015 12:27 PM

(06-23-2015 01:59 AM)rgallier Wrote:  Why does
det( [ [ i j k ] , [ 2 3 1 ] , [ 1 2 3 ] ])
return
-6.48*j+2.04*k-0.24*i
instead of
-0.24*i-6.48*j+2.04*k

"i" is always put at the end because "i" is not a variable, but is the constant i. Try h+i+j; it returns h+j+i. Never use i or e as variables, because they aren't.