Tool to calculate the direct sums of matrices (formal computation). The matrix direct sum calculates the sum of N matrices that can be of different sizes.

Matrix Direct Sum - dCode

Tag(s) : Matrix

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!

A suggestion ? a feedback ? a bug ? an idea ? *Write to dCode*!

Given $ M_1=[a_{ij}] $ a matrix of $ m $ lines and $ n $ columns and $ M_2=[b_{ij}] $ a matrix of $ p $ lines and $ q $ columns (2x2, 2x3, 3x2, 3x3, etc).

The **direct sum** of these 2 matrices is noted with the character ⊕ (circled plus sign) $ M_1 \oplus M_2 $ and is a matrix of $ m+p $ lines and $ n+q $ columns.

$$ A \oplus B = \begin{bmatrix} [a_{ij}] & [0] \\ [0] & [b_{ij}] \end{bmatrix} $$

__Example:__ $$ \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} \oplus \begin{bmatrix} 7 & 8 \\ 9 & 10 \end{bmatrix} = \begin{bmatrix} 1 & 2 & 3 & 0 & 0 \\ 4 & 5 & 6 & 0 & 0 \\ 0 & 0 & 0 & 7 & 8 \\ 0 & 0 & 0 & 9 & 10 \end{bmatrix} $$

Practically, the matrix addition by **direct sum** does not require any calculation, it only consist in copying the matrices diagonally, into a larger one, and fill with zeros.

The **direct sum** operation must be distinguished from the conventional operation of matrix addition, although it may take different size matrices, the result is not at all identical.

The direct addition is generalizable to N matrices, but the order matter.

$$ A \oplus B \oplus C = ( A \oplus B ) \oplus C \neq A \oplus ( B \oplus C ) $$

dCode retains ownership of the online 'Matrix Direct Sum' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any 'Matrix Direct Sum' algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any 'Matrix Direct Sum' function (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and no data download, script, copy-paste, or API access for 'Matrix Direct Sum' will be for free, same for offline use on PC, tablet, iPhone or Android ! dCode is free and online.

Please, check our dCode Discord community for help requests!

NB: for encrypted messages, test our automatic cipher identifier!

direct,sum,addition,plus,matrix

Source : https://www.dcode.fr/matrix-direct-sum

© 2021 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.

Feedback

▲
Thanks to your feedback and relevant comments, dCode has developed the best 'Matrix Direct Sum' tool, so feel free to write! Thank you!