Skip to main content
Tweeted twitter.com/#!/StackMma/status/327693877282742272
General cleanup
Source Link
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

forI want to split a list of sums into a sum of lists For example, I'd like to turn

{{x + y + z}, {x}, {y}, {z}} 

{{x+y+z},{x}.{y},{z}} into x{{1},{1},{0},{0}}+y{{1},{0},{1},{0}}+z{{1},{0},{0},{1}}

x{{1}, {1}, {0}, {0}} +y{{1}, {0}, {1}, {0}} + z{{1}, {0}, {0}, {1}}

as you would when turning a vector with a sum inside it into a sum of vectors. 

I've looked all over for documentation onfor this kind of thing, but I couldn't find anything :(. It would be even further helpful if someone could tell me how to put thosethese three vectors into a single list, I know I can append them, I'm just not sure how to do it when they're being multiplied by something.

Thanks!

for example, I'd like to turn

{{x+y+z},{x}.{y},{z}} into x{{1},{1},{0},{0}}+y{{1},{0},{1},{0}}+z{{1},{0},{0},{1}}

as you would when turning a vector with a sum inside it into a sum of vectors. I've looked all over for documentation on this kind of thing, I couldn't find anything :(. It would be even further helpful if someone could tell me how to put those three vectors into a single list, I know I can append them, I'm just not sure how to do it when they're being multiplied by something.

Thanks!

I want to split a list of sums into a sum of lists For example, I'd like to turn

{{x + y + z}, {x}, {y}, {z}} 

into

x{{1}, {1}, {0}, {0}} +y{{1}, {0}, {1}, {0}} + z{{1}, {0}, {0}, {1}}

as you would when turning a vector with a sum inside it into a sum of vectors. 

I've looked all over for documentation for this kind of thing, but I couldn't find anything :(. It would be even further helpful if someone could tell me how to put these three vectors into a single list, I know I can append them, I'm just not sure how to do it when they're being multiplied by something.

Source Link

Splitting list of sums into a sum of lists

for example, I'd like to turn

{{x+y+z},{x}.{y},{z}} into x{{1},{1},{0},{0}}+y{{1},{0},{1},{0}}+z{{1},{0},{0},{1}}

as you would when turning a vector with a sum inside it into a sum of vectors. I've looked all over for documentation on this kind of thing, I couldn't find anything :(. It would be even further helpful if someone could tell me how to put those three vectors into a single list, I know I can append them, I'm just not sure how to do it when they're being multiplied by something.

Thanks!