## Modelica_LinearSystems2.WorkInProgress.Math.Complex.Matrices

### Package Content

Name | Description
--- | ---
conditionNumber | Calculate the condition number norm(A)*norm(inv(A))
norm | Returns the norm of a matrix
inv | Inverse of a comlex matrix (try to avoid, use function solve(..) instead)

## Modelica_LinearSystems2.WorkInProgress.Math.Complex.Matrices.conditionNumber

Calculate the condition number norm(A)*norm(inv(A))

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

Name | Description
--- | ---
A[:, :] | Input matrix
p | Type of p-norm (only allowed: 1, 2 or Modelica.Constants.inf)

### Outputs

Name | Description
--- | ---
result | p-norm of matrix A

## Modelica_LinearSystems2.WorkInProgress.Math.Complex.Matrices.norm

Returns the norm of a matrix

### Information

#### Syntax

>     Matrices.norm(A);
>     Matrices.norm(A, p=2);

#### Description

The function call "`Matrices.norm(A)`" returns the 2-norm of matrix A, i.e., the largest singular value of A.
The function call "`Matrices.norm(A, p)`" returns the p-norm of matrix A. The only allowed values for p are

- "p=1": the largest column sum of A
- "p=2": the largest singular value of A
- "p=Modelica.Constants.inf": the largest row sum of A

Note, for any matrices A1, A2 the following inequality holds:

>     Matrices.norm(A1+A2,p) ≤ Matrices.norm(A1,p) + Matrices.norm(A2,p)

Note, for any matrix A and vector v the following inequality holds:

>     Vectors.norm(A*v,p) ≤ Matrices.norm(A,p)*Vectors.norm(A,p)

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

Name | Description
--- | ---
A[:, :] | Input matrix
p | Type of p-norm (only allowed: 1, 2 or Modelica.Constants.inf)

### Outputs

Name | Description
--- | ---
result | p-norm of matrix A

## Modelica_LinearSystems2.WorkInProgress.Math.Complex.Matrices.inv

Inverse of a comlex matrix (try to avoid, use function solve(..) instead)

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

Name | Description
--- | ---
A[:, size(A, 1)] |

### Outputs

Name | Description
--- | ---
invA[size(A, 1), size(A, 2)] | Inverse of matrix A