The minimum size pipe you can use to drain a shower is 1 ½ inches, with 2 inches as the maximum you can use for a shower. Washing machine drainpipes are 2 inches as well; thus, as long as you adhere to the 2-inch rule, you can tie in your shower and tub to the washing machine line. You cannot use a larger than 2-inch pipe because there will be pipe that won’t carry the water properly, instead pooling it in the bottom of the drainpipe.
If you have ever taken a bottle of soda or water and turned it over, the first thing you notice is that the bottle will “glug,” not pouring out smoothly. This is because there is insufficient airflow coming into the bottle to help move the liquid along. The same rule applies to drainpipes. You can tie in a shower and tub drain to your washing machine drain as long as there is a vented pipe tied into the drain to keep the flow moving along fluidly.
The angle of your drainpipes is also important. As a general rule, you need to have a minimum of a quarter-inch for every linear foot of horizontal pipe you run in your home. This applies to all drainpipes. The vertical pipes are not an issue; however, once you get to the horizontal sections, you need sufficient slope to move the water along the drainpipe rather than allowing it to back up somewhere, or even cease flowing.
Although you can certainly tie in the washing machine with the tub and shower, you must still observe the basic rules of plumbing, such as how many branches you are allowed to tie into the main drain line. Always talk with a local professional regarding federal, state and local plumbing codes, since there are always variations throughout the levels of approval. This is a must if you want manufacturer warranties to apply.