> ## 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.

# Diagonal

Creation of a matrix, of size N by N, with the input vector on the diagonal and 0 elsewhere.

![](https://mintlify.s3.us-west-1.amazonaws.com/synopsys-00a47cbc/docs/scade-one/scade-one-standard-libraries/2025-r1/libraries/images/matrix__diagonal_00.svg)

## Interface

| Name | Kind | Type | Comment |
| - | :-: | - | - |
| N | P | N/A | Number of rows and columns in matrix |
| v | I | numeric^N | Input vector |
| A | O | numeric^N^N | Output matrix |

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