Mandatory spending and discretionary spending are related in that mandatory spending refers to government spending that is required by law, while discretionary spending refers to government spending that is determined by annual appropriations and can be adjusted by policymakers.