# getMatrixDataType() Function & Examples

Use the getMatrixDataType() matrix function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## getMatrixDataType

#### getMatrixDataType(x)

Try it yourself:

```calculio
getMatrixDataType([1, 2, 3])
getMatrixDataType([[5 cm], [2 inch]])
getMatrixDataType([1, "text"])
getMatrixDataType([1, bignumber(4)])
```

---

## Inspect a matrix storage type

**getMatrixDataType(x)** reports the data type used by a matrix. It is an inspection tool for workflows where numeric representation matters, such as typed matrix operations, interoperation, or performance-sensitive calculations.

## Why type inspection helps

Knowing whether entries are ordinary numbers, big numbers, fractions, or complex values helps explain arithmetic behavior. Combine this with [typeOf](https://calcul.io/function/typeOf/index.md) for general value inspection and [size](https://calcul.io/function/size/index.md) for matrix shape. Use [getMatrixDataType](https://calcul.io/function/getMatrixDataType/index.md) before assuming that an operation preserves a chosen representation.

## Practical caveats

This function describes storage rather than validating that every value is sensible for a calculation. Check numerical suitability with [isNumeric](https://calcul.io/function/isNumeric/index.md) or [hasNumericValue](https://calcul.io/function/hasNumericValue/index.md). Matrix construction and conversion rules can affect the reported type, so inspect results after [matrixFromRows](https://calcul.io/function/matrixFromRows/index.md) or other transformations.

[All functions](https://calcul.io/functions/index.md)
