odin-lang / odin-lang.org

http://odin-lang.org
26 stars 80 forks source link

Scalars are diagonal matrices, not identity matrices. #224

Closed hkzsm closed 4 weeks ago

hkzsm commented 1 month ago

An identity matrix is a diagonal matrix with all its diagonal elements equal to 1, and zeroes everywhere else.

But in Odin, all diagonal elements are equal to a scalar value, not to 1. Such matrices are called diagonal and are a more general case of the identity matrix.

JesseRMeyer commented 4 weeks ago

But a scaled diagonal matrix does not imply that the diagonal entries are the same value, which is the intention of the comment. Thanks for the PR but I think we'll keep the language as-is.