# HP Forums

Full Version: Cross in Matrix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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}$$
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.
Why does
det( [ [ i j k ] , [ 2 3 1 ] , [ 1 2 3 ] ])
return
-6.48*j+2.04*k-0.24*i