# Still looking for a way to use units meaningfully with SciML ecosystem

**URL:** <https://discourse.julialang.org/t/still-looking-for-a-way-to-use-units-meaningfully-with-sciml-ecosystem/103678>\
**Category:** General Usage\
**Tags:** forwarddiff, unitful\
**Created:** [September 8, 2023, 7:29pm UTC](https://discourse.julialang.org/t/still-looking-for-a-way-to-use-units-meaningfully-with-sciml-ecosystem/103678 "2023-09-08T19:29:35Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Ickaser](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ickaser/32/28852_2.png) [@Ickaser](https://discourse.julialang.org/u/Ickaser)\
**Post date:** [January 24, 2025, 11:19am UTC](https://discourse.julialang.org/t/still-looking-for-a-way-to-use-units-meaningfully-with-sciml-ecosystem/103678/12 "2025-01-24T11:19:59Z")

</div>

> [@ChrisRackauckas](#):
>
> Many numerical methods are just not unit compatible though. Comparing it to [Measurements.jl](https://juliaregistries.github.io/General/packages/redirect_to_repo/Measurements) doesn’t even make sense. What are the units of a Jacobian inverse? The inverse and other matrix operations are linear combinations of all elements, and so if your `u` has different units then these operations are almost surely defining a Jacobian inverse that doesn’t make sense. And if linear algebraic operations don’t make sense, then Newton’s method and all sorts of numerical operations will fail.

This statement has bothered me ever since I read it; after a quick read of [George Hart’s “Multidimensonal Analysis”](https://link.springer.com/book/10.1007/978-1-4612-4208-6), I have been persuaded that a dimensionful Jacobian can be well defined and should also have a well-defined inverse. Any matrix that represents a set of dimensionally-consistent equations can be given a well-defined structure of its dimensions, as noted [here](https://discourse.julialang.org/t/physical-units-in-julia/76825/15) and implemented by one person [here](https://github.com/anonymous-shrew/UnitfulTensors.jl/). Certainly it is true that many algorithms may not be dimensionally consistent as currently implemented, but I am optimistic that many of these are not unresolvable issues, and maybe with wrappers that carry around the dimensional parts, we can perhaps even still use BLAS, etc.

On the other hand, discussion in [Quantity currently incompatible with QuadGK · Issue #40 · SymbolicML/DynamicQuantities.jl · GitHub](https://github.com/SymbolicML/DynamicQuantities.jl/issues/40) makes me inclined to believe that encoding dimensions in types hews closer to a mathematically rigorous definition of dimension.

---

_[View the full topic](https://discourse.julialang.org/t/still-looking-for-a-way-to-use-units-meaningfully-with-sciml-ecosystem/103678)._
