> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sub

Subtraction of two matrices, element-wise.

![](https://mintcdn.com/synopsys-00a47cbc/Srh1_f--TdKCLyqD/docs/scade-one/scade-one-standard-libraries/2025-r2/libraries/images/matrix__sub_00.svg?fit=max\&auto=format\&n=Srh1_f--TdKCLyqD\&q=85\&s=3c13df50c510b75e27e028dc7160174e)

## Interface

| Name | Kind | Type | Comment |
| - | :-: | - | - |
| N | P | N/A | Number of columns in matrix |
| M | P | N/A | Number of rows in matrix |
| A | I | numeric^N^M | First input matrix |
| B | I | numeric^N^M | Second input matrix |
| C | O | numeric^N^M | Output matrix |

**Parent topic:**[Matrix](https://developer.synopsys.com/docs/scade-one/scade-one-standard-libraries/2025-r2/libraries/matrix/matrix)
