Matrix multiplication: Difference between revisions

Content added Content deleted
(→‎TI-89 BASIC: new example)
m (alphabetize TI-*)
Line 926: Line 926:
FROM a AS lhs, b AS rhs
FROM a AS lhs, b AS rhs
WHERE lhs.x = 0 AND rhs.y = 0;
WHERE lhs.x = 0 AND rhs.y = 0;
=={{header|TI-83 BASIC}}==
Store your matrices in <tt>[A]</tt> and <tt>[B]</tt>.
Disp [A]*[B]
An error will show if the matrices have invalid dimensions for multiplication.

=={{header|TI-89 BASIC}}==

{{trans|Mathematica}}

[1,2; 3,4; 5,6; 7,8] → m1
[1,2,3; 4,5,6] → m2
m1 * m2

Or without the variables:

[1,2; 3,4; 5,6; 7,8] * [1,2,3; 4,5,6]

The result (without prettyprinting) is:

[[9,12,15][19,26,33][29,40,51][39,54,69]]


=={{header|Tcl}}==
=={{header|Tcl}}==
Line 973: Line 953:
-7 -6 11
-7 -6 11
-17 -20 25 </pre>
-17 -20 25 </pre>

=={{header|TI-83 BASIC}}==
Store your matrices in <tt>[A]</tt> and <tt>[B]</tt>.
Disp [A]*[B]
An error will show if the matrices have invalid dimensions for multiplication.

=={{header|TI-89 BASIC}}==

{{trans|Mathematica}}

[1,2; 3,4; 5,6; 7,8] → m1
[1,2,3; 4,5,6] → m2
m1 * m2

Or without the variables:

[1,2; 3,4; 5,6; 7,8] * [1,2,3; 4,5,6]

The result (without prettyprinting) is:

[[9,12,15][19,26,33][29,40,51][39,54,69]]


=={{header|Ursala}}==
=={{header|Ursala}}==