# Math::Matrix

This is the Math::Matrix class.

Represents a matrix) of any dimensions.

## Initializer

```\$mtrx = Matrix(\$m: Int)
```

Creates a matrix with the given entries and row count.

• m: Int - Number of rows.

• optional items: Num... - Variable number of arguments. List of entries.

## Methods

### m

```\$mtrx.m
```

Property. Number of rows.

### rows

```\$mtrx.rows
```

Computed property. Number of rows. Same as `m`.

### columns

```\$mtrx.columns
```

Computed property. Number of columns.

### dimensionHR

```\$mtrx.dimensionHR
```

### rowList

```\$mtrx.rowList
```

Computed property. A list whose elements are lists of items in each row.

### map

```\$mtrx.map(\$code: Code)
```

Creates a matrix with the given transformation applied to each entry.

• code: Code

### mapWith

```\$mtrx.mapWith(\$rhs: Matrix, \$code: Code)
```

Creates a matrix with the given operation performed between each entry and its corresponding entry in another matrix of the same dimensions.

• rhs: Matrix - Another matrix of the same dimensions.

• code: Code - Code which returns a new entry when given the.

```\$mtrx + (\$ehs: Num)
```

### Subtraction operator (-)

```\$mtrx - (\$rhs: Num)
```

Scalar subtraction.

### Subtraction operator (-)

```\$mtrx - (\$lhs: Num)
```

Allows you to take the opposite matrix.

### Multiplication operator (*)

```\$mtrx * (\$ehs: Num)
```

Scalar multiplication.

### Division operator (/)

```\$mtrx / (\$rhs: Num)
```

Scalar division.

```\$mtrx + (\$ehs: Matrix)
```

```\$mtrx - (\$rhs: Matrix)