This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-05
Channels
- # bangalore-clj (1)
- # beginners (50)
- # boot (72)
- # cider (53)
- # cljs-dev (303)
- # cljsrn (2)
- # clojure (403)
- # clojure-conj (3)
- # clojure-dev (7)
- # clojure-italy (18)
- # clojure-russia (129)
- # clojure-sg (1)
- # clojure-spec (44)
- # clojure-uk (25)
- # clojurescript (112)
- # core-async (4)
- # core-typed (3)
- # cursive (23)
- # datomic (114)
- # defnpodcast (1)
- # emacs (1)
- # figwheel (2)
- # graphql (18)
- # hoplon (110)
- # instaparse (6)
- # jobs (3)
- # jobs-discuss (10)
- # leiningen (5)
- # luminus (1)
- # lumo (151)
- # off-topic (22)
- # om (3)
- # om-next (3)
- # onyx (4)
- # parinfer (1)
- # pedestal (8)
- # precept (51)
- # re-frame (19)
- # reagent (3)
- # ring (1)
- # ring-swagger (5)
- # spacemacs (21)
- # sql (25)
- # test-check (2)
- # uncomplicate (8)
- # unrepl (33)
- # untangled (20)
- # yada (14)
Not yet, I was simply playing along with the linear algebra book and they point it out as one of the special matrixes that are quite useful.
That's the catch: The identity element is the most important element when you develop algebra theory (thus also linear algebra theory). It is special because it doesn't change anything under the algebraic operation at hand. So, in computing, if you don't want to change anything, simply don't run the computation 🙂
With matrices, additional thing that you need to consider is that for each dimension n
, you can make nxn
identity matrix to be used in computations where nxn
dimension needs to be fitted.
Also, Neanderthal supports several different data structure formats for special kinds of matrices. Each of those formats can also hold an identity matrix.
You can create an identity matrix with certain dimensions by creating a zero matrix and setting its diagonal to 1.0:
(let [a (some-matrix-that-you-provide)]
(entry! (dia (zero a)) 1.0))
Or, if you need a triangular identity matrix, you can use a special case where :diag
is :unit
: (dtr n {:diag :unit})