### 8.187 `MATMUL` — matrix multiplication ¶

Description:

Performs a matrix multiplication on numeric or logical arguments.

Standard:

Fortran 90 and later

Class:

Transformational function

Syntax:

`RESULT = MATMUL(MATRIX_A, MATRIX_B)`

Arguments:
 MATRIX_A An array of `INTEGER`, `REAL`, `COMPLEX`, or `LOGICAL` type, with a rank of one or two. MATRIX_B An array of `INTEGER`, `REAL`, or `COMPLEX` type if MATRIX_A is of a numeric type; otherwise, an array of `LOGICAL` type. The rank shall be one or two, and the first (or only) dimension of MATRIX_B shall be equal to the last (or only) dimension of MATRIX_A. MATRIX_A and MATRIX_B shall not both be rank one arrays.
Return value:

The matrix product of MATRIX_A and MATRIX_B. The type and kind of the result follow the usual type and kind promotion rules, as for the `*` or `.AND.` operators.
{"ft_lang_label":"__label__en","ft_lang_prob":0.66414434,"math_prob":0.96828896,"size":748,"snap":"2023-40-2023-50","text_gpt3_token_len":200,"char_repetition_ratio":0.14784946,"word_repetition_ratio":0.016129032,"special_character_ratio":0.23128343,"punctuation_ratio":0.13793103,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9921361,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-10-01T20:28:13Z\",\"WARC-Record-ID\":\"<urn:uuid:21f421bc-5008-4658-aca5-861b5665049a>\",\"Content-Length\":\"5281\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c5e1b639-fd38-48b1-8693-073a06da624e>\",\"WARC-Concurrent-To\":\"<urn:uuid:a9fde462-dd13-4550-b700-9df837601c4a>\",\"WARC-IP-Address\":\"8.43.85.97\",\"WARC-Target-URI\":\"https://gcc.gnu.org/onlinedocs/gfortran/MATMUL.html\",\"WARC-Payload-Digest\":\"sha1:CACTWSHQUQHE63VPKOCFI7K3T6RTZJIK\",\"WARC-Block-Digest\":\"sha1:IL7NQMTAKXNOF3J66JE7XY44EIQZ6OZH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233510924.74_warc_CC-MAIN-20231001173415-20231001203415-00582.warc.gz\"}"}