I posted this on another site just now, so it's basically a copy and paste job, but useful stuff nonetheless.
Before I present it I'd like to have a quick look at what a Matrix actually does.

So it is just like the RGB Mixer (with preserve luminance unticked). If the first line of the 3X3 Matrix was (x1 y1 z1), the second line (x2 y2 z2), and the bottom line (x3 y3 z3), then to get the new RGB values from a Matrix transform you would perform the following:
(R*x1)+(G*y1)+(B*z1)=R
(R*x2)+(G*y2)+(B*z2)=G
(R*x3)+(G*y3)+(B*z3)=B
So because it is presently not possible to input specific values into the RGB Mixer, then in order to replicate a transform we will need to separate the channels, multiply them by the appropriate Matrix values, and add them back together in the appropriate stream.
Starting with the final (compound node) stage, and working backwards from there we get these:






By limiting node functions to simple addition, subtraction, and multiplication (and Channel Swap in RGB Mixer), and removing the need to engage with Resolves GUI controls, a more mathematically precise approach can be realised.
It can be a hog on resources though, but the compound node can be cached. The Matrix values are entered in the Key Output section of the nodes labelled above. This limits the multiplication factor to between 0 and 1.0, but if a value greater than 1 is required then simply multiply the node by a factor and then divide the Matrix value by that same factor, and the net result will comply with requirements. You can type a very specific value into the Key Output, but it will round that to 3 decimal places. Whether that's an actual rounding up, or the input is preserved and the display is rounded up for appearance sake, I do not know. Perhaps someone at Blackmagic Design can clarify.
To put things into perspective, the ability to perform specific Matrix transformations within Resolve means it has just as many options as Baselight with regards to Colorspaces. Resolve Colour Management is basically a fixed set of transforms, involving a conversion to Scene Linear, a 3X3 Matrix conversion for the Primaries, and a conversion from Scene Linear to which ever tone curve is stipulated. There was a recent case when someone wanted to incorporate RedLog DragonColor2 footage into RCM, but that wasn't an option. DragonColor2 to XYZ Matrix values are available, so using the system above the footage can be converted to whichever Colorspace you prefer (via two Matrix conversions, but these can be concatenated into one Matrix).
http://colour-science.org/api/0.3.5/html/colour.models.dataset.red.htmlThere is a great source of Matrices to be found in the free version Nuke, covering both a number of Primaries and Illuminants.



Here's a link to folder that contains the following:
3X3 Matrix Template Compound.drx
Add Alexa FM.drx
Alexa Wide Gamut(Tone Mapped) to Rec709.drx
Remove Alexa FM.drx
LogC to Linear 1D Shaper LUT
Linear to LogC 1D Shaper LUT
LogC to Rec709 1D ShaperLUT
LogC Alexa Wide Gamut to Rec709 Rec709 3D LUT
https://www.sendspace.com/file/89ktr7The LUTs were generated with Ben Turley's excellent LUTCalc:
http://cameramanben.github.io/LUTCalc/LUTCalc/index.htmlYou can download the app for Mac as well.
If someone had a word with Blackmagic Design and persuaded them to allow for more accessible RGB Mixer and Custom Curves Inputs, then all the node havoc above would no longer be necessary. Even just an option in Preferences to activate custom Input would do the trick. It would make a world of difference, and wouldn't require any extra fancy coding.
Please feel free to test and give feedback. Thank you.