Difference between revisions of "Documentation/How Tos/Calc: MMULT function"

From Apache OpenOffice Wiki
Jump to: navigation, search
(See also:)
m (Robot: Automated text replacement %s)
Line 16: Line 16:
 
: when entered as an array formula in cell B3, returns <tt>'''40'''</tt> in cell B3 and <tt>'''46'''</tt> in cell C3. A 1 x 3 matrix was multiplied by a 3 x 2 matrix, giving a 1 x 2 matrix result, calculated as 1*4 + 2*6 + 3*8 = 40 and 1*5 + 2*7 + 3*9 = 46.
 
: when entered as an array formula in cell B3, returns <tt>'''40'''</tt> in cell B3 and <tt>'''46'''</tt> in cell C3. A 1 x 3 matrix was multiplied by a 3 x 2 matrix, giving a 1 x 2 matrix result, calculated as 1*4 + 2*6 + 3*8 = 40 and 1*5 + 2*7 + 3*9 = 46.
  
=== See also: ===
+
{{Documentation/SeeAlso|
  
[[Documentation/How_Tos/Calc: MDETERM function|'''MDETERM''']],
+
* [[Documentation/How_Tos/Calc: MDETERM function|MDETERM]],
[[Documentation/How_Tos/Calc: MINVERSE function|'''MINVERSE''']],
+
* [[Documentation/How_Tos/Calc: MINVERSE function|MINVERSE]],
[[Documentation/How_Tos/Calc: MUNIT function|'''MUNIT''']]
+
* [[Documentation/How_Tos/Calc: MUNIT function|MUNIT]]
  
[[Documentation/How_Tos/Using Arrays|'''How To Use Arrays in Calc''']]
+
* [[Documentation/How_Tos/Using Arrays|How To Use Arrays in Calc]]
  
[[Documentation/How_Tos/Calc: Array functions|'''Array functions''']]
+
* [[Documentation/How_Tos/Calc: Array functions|Array functions]]
  
[[Documentation/How_Tos/Calc: Functions listed alphabetically|'''Functions listed alphabetically''']],
+
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
[[Documentation/How_Tos/Calc: Functions listed by category|'''Functions listed by category''']]
+
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}

Revision as of 14:05, 25 February 2009


MMULT

Returns the ordinary product of two matrices.

Syntax:

MMULT(array1; array2)

multiplies array1 and array2, and returns the matrix result. array1 and array2 may each be either an inline array or a range, containing all numbers.
The number of columns in array1 must be the same as the number of rows in array2.
MMULT returns an array with the same number of rows as array1 and the same number of columns as array2. MMULT must be entered as an array formula (for example by using Cntrl-Shift-Enter rather than just Enter).

Example:

=MMULT({1;2;3};{4;5|6;7|8;9})

when entered as an array formula in cell B3, returns 40 in cell B3 and 46 in cell C3. A 1 x 3 matrix was multiplied by a 3 x 2 matrix, giving a 1 x 2 matrix result, calculated as 1*4 + 2*6 + 3*8 = 40 and 1*5 + 2*7 + 3*9 = 46.

Template:Documentation/SeeAlso

Personal tools