<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2024 Workiva-->
<!--r:82cd5a2c-a4e3-4bab-a7cf-3cdd62fc594c,g:6719482f-1946-4ec2-b49d-b3c372091591-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity" xlink:type="simple" xlink:href="mtrx-20240331.xsd#CondensedConsolidatedStatementsofChangesinStockholdersEquity"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_cafd009f-3f09-44a0-bd5e-f1aa96a88e86" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_9fe56657-bf95-4360-8968-f99f7e884347" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_cafd009f-3f09-44a0-bd5e-f1aa96a88e86" xlink:to="loc_us-gaap_StatementTable_9fe56657-bf95-4360-8968-f99f7e884347" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_dbb6c89f-fc40-43f3-91c1-ba1a1c7b71bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_9fe56657-bf95-4360-8968-f99f7e884347" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_dbb6c89f-fc40-43f3-91c1-ba1a1c7b71bd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_dbb6c89f-fc40-43f3-91c1-ba1a1c7b71bd_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_dbb6c89f-fc40-43f3-91c1-ba1a1c7b71bd" xlink:to="loc_us-gaap_EquityComponentDomain_dbb6c89f-fc40-43f3-91c1-ba1a1c7b71bd_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_7c5f890f-d3c7-451e-bd06-60c664db7daa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_dbb6c89f-fc40-43f3-91c1-ba1a1c7b71bd" xlink:to="loc_us-gaap_EquityComponentDomain_7c5f890f-d3c7-451e-bd06-60c664db7daa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_822c52e9-9904-40f0-a16c-ad292d4071bf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_7c5f890f-d3c7-451e-bd06-60c664db7daa" xlink:to="loc_us-gaap_CommonStockMember_822c52e9-9904-40f0-a16c-ad292d4071bf" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_78ffce77-fb13-45a2-aed5-02be119474d0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdditionalPaidInCapitalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_7c5f890f-d3c7-451e-bd06-60c664db7daa" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_78ffce77-fb13-45a2-aed5-02be119474d0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsMember_404b5c4d-33ad-4730-bc2d-337e02ae6b55" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_7c5f890f-d3c7-451e-bd06-60c664db7daa" xlink:to="loc_us-gaap_RetainedEarningsMember_404b5c4d-33ad-4730-bc2d-337e02ae6b55" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_85171ed2-7719-4768-a40d-4813afc92335" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_7c5f890f-d3c7-451e-bd06-60c664db7daa" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_85171ed2-7719-4768-a40d-4813afc92335" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonMember_f01fef3e-d37a-42f7-a049-a2332c7f12b7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockCommonMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_7c5f890f-d3c7-451e-bd06-60c664db7daa" xlink:to="loc_us-gaap_TreasuryStockCommonMember_f01fef3e-d37a-42f7-a049-a2332c7f12b7" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_c5d0809d-147c-4be4-9671-6be05780e21f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_cafd009f-3f09-44a0-bd5e-f1aa96a88e86" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_c5d0809d-147c-4be4-9671-6be05780e21f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_c1821328-9e9f-4460-9bb7-b0e3b05c4a04" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_c5d0809d-147c-4be4-9671-6be05780e21f" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_c1821328-9e9f-4460-9bb7-b0e3b05c4a04" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_075a7686-c3bd-4a61-a29a-494c79b313b1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProfitLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_c5d0809d-147c-4be4-9671-6be05780e21f" xlink:to="loc_us-gaap_ProfitLoss_075a7686-c3bd-4a61-a29a-494c79b313b1" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_4ee98049-cb44-4fb1-b1fe-36a2ba882b03" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_c5d0809d-147c-4be4-9671-6be05780e21f" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_4ee98049-cb44-4fb1-b1fe-36a2ba882b03" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalOther_732b4bee-d6de-4725-a8c3-897601eb02f2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalOther"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_c5d0809d-147c-4be4-9671-6be05780e21f" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalOther_732b4bee-d6de-4725-a8c3-897601eb02f2" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan_80d5be4d-ca2f-443e-b8e1-d2aafc59a1d7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_c5d0809d-147c-4be4-9671-6be05780e21f" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan_80d5be4d-ca2f-443e-b8e1-d2aafc59a1d7" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_OtherTreasurySharePurchases_67322333-9c3d-44f0-b471-643e639a9d71" xlink:href="mtrx-20240331.xsd#mtrx_OtherTreasurySharePurchases"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_c5d0809d-147c-4be4-9671-6be05780e21f" xlink:to="loc_mtrx_OtherTreasurySharePurchases_67322333-9c3d-44f0-b471-643e639a9d71" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_2f959076-0ca2-4ab9-8435-add3eb95a6af" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_c5d0809d-147c-4be4-9671-6be05780e21f" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_2f959076-0ca2-4ab9-8435-add3eb95a6af" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_5aa45e1c-ca1e-497d-bba0-03da6c3e9321" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RevenueNarrativeDetails" xlink:type="simple" xlink:href="mtrx-20240331.xsd#RevenueNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/RevenueNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueLineItems_b940b7f1-19c5-42f9-ae9b-cda48b63cb3f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_f9c294ab-294b-40dd-b48d-c60f2ffe6ee5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_b940b7f1-19c5-42f9-ae9b-cda48b63cb3f" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_f9c294ab-294b-40dd-b48d-c60f2ffe6ee5" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_a12f892e-1199-4260-b255-923847fd7803" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_f9c294ab-294b-40dd-b48d-c60f2ffe6ee5" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_a12f892e-1199-4260-b255-923847fd7803" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_a12f892e-1199-4260-b255-923847fd7803_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_a12f892e-1199-4260-b255-923847fd7803" xlink:to="loc_us-gaap_SegmentDomain_a12f892e-1199-4260-b255-923847fd7803_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_f316941d-ba68-443c-a7d8-974130ea8a03" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_a12f892e-1199-4260-b255-923847fd7803" xlink:to="loc_us-gaap_SegmentDomain_f316941d-ba68-443c-a7d8-974130ea8a03" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_ProcessAndIndustrialFacilitiesSegmentMember_db45baf6-c58b-42af-a615-cb99e42dbb27" xlink:href="mtrx-20240331.xsd#mtrx_ProcessAndIndustrialFacilitiesSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_f316941d-ba68-443c-a7d8-974130ea8a03" xlink:to="loc_mtrx_ProcessAndIndustrialFacilitiesSegmentMember_db45baf6-c58b-42af-a615-cb99e42dbb27" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueRemainingPerformanceObligation_34bbbf70-a120-4dbb-8ce4-409bfa6098a9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenueRemainingPerformanceObligation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_b940b7f1-19c5-42f9-ae9b-cda48b63cb3f" xlink:to="loc_us-gaap_RevenueRemainingPerformanceObligation_34bbbf70-a120-4dbb-8ce4-409bfa6098a9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_Performanceobligationstoberecognizedasrevenuewithinnexttwelvemonths_64040a19-baf1-477e-b78b-52f2acf51794" xlink:href="mtrx-20240331.xsd#mtrx_Performanceobligationstoberecognizedasrevenuewithinnexttwelvemonths"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_b940b7f1-19c5-42f9-ae9b-cda48b63cb3f" xlink:to="loc_mtrx_Performanceobligationstoberecognizedasrevenuewithinnexttwelvemonths_64040a19-baf1-477e-b78b-52f2acf51794" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityRevenueRecognized_81dd3c54-7345-4088-90d3-c24dfac901ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ContractWithCustomerLiabilityRevenueRecognized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_b940b7f1-19c5-42f9-ae9b-cda48b63cb3f" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityRevenueRecognized_81dd3c54-7345-4088-90d3-c24dfac901ec" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConstructionContractorReceivableRetainageYearOne_a52a6043-8187-4d40-a140-c6ae047e8523" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConstructionContractorReceivableRetainageYearOne"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_b940b7f1-19c5-42f9-ae9b-cda48b63cb3f" xlink:to="loc_us-gaap_ConstructionContractorReceivableRetainageYearOne_a52a6043-8187-4d40-a140-c6ae047e8523" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConstructionContractorReceivableRetainageAfterYearOne_cd179cf2-3569-4496-9591-fcc72db6d30b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConstructionContractorReceivableRetainageAfterYearOne"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_b940b7f1-19c5-42f9-ae9b-cda48b63cb3f" xlink:to="loc_us-gaap_ConstructionContractorReceivableRetainageAfterYearOne_cd179cf2-3569-4496-9591-fcc72db6d30b" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnapprovedChangeOrdersAmount_64618816-1483-43c0-8bb5-18ab38c53565" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UnapprovedChangeOrdersAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_b940b7f1-19c5-42f9-ae9b-cda48b63cb3f" xlink:to="loc_us-gaap_UnapprovedChangeOrdersAmount_64618816-1483-43c0-8bb5-18ab38c53565" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossOnContracts_c9b92c5f-37ae-43d7-ac84-7200fa98e6d2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LossOnContracts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_b940b7f1-19c5-42f9-ae9b-cda48b63cb3f" xlink:to="loc_us-gaap_LossOnContracts_c9b92c5f-37ae-43d7-ac84-7200fa98e6d2" xlink:type="arc" order="6"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RevenueSummaryofRevenuebyGeographicAreasDetails" xlink:type="simple" xlink:href="mtrx-20240331.xsd#RevenueSummaryofRevenuebyGeographicAreasDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/RevenueSummaryofRevenuebyGeographicAreasDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueLineItems_befd3508-4915-49de-b24a-c52c3c06d3db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_14e56a00-956e-463d-9301-452cd8be0171" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_befd3508-4915-49de-b24a-c52c3c06d3db" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_14e56a00-956e-463d-9301-452cd8be0171" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StatementGeographicalAxis_d6e5ceb8-b4f2-490c-8a73-ceeaa537637b" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_StatementGeographicalAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_14e56a00-956e-463d-9301-452cd8be0171" xlink:to="loc_srt_StatementGeographicalAxis_d6e5ceb8-b4f2-490c-8a73-ceeaa537637b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_d6e5ceb8-b4f2-490c-8a73-ceeaa537637b_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_d6e5ceb8-b4f2-490c-8a73-ceeaa537637b" xlink:to="loc_srt_SegmentGeographicalDomain_d6e5ceb8-b4f2-490c-8a73-ceeaa537637b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_a2e2fab3-c9c7-4311-8215-911476c7bfec" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_d6e5ceb8-b4f2-490c-8a73-ceeaa537637b" xlink:to="loc_srt_SegmentGeographicalDomain_a2e2fab3-c9c7-4311-8215-911476c7bfec" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_country_US_a481cf7a-cad0-40c6-9d2e-6d0a7b930f66" xlink:href="https://xbrl.sec.gov/country/2023/country-2023.xsd#country_US"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_a2e2fab3-c9c7-4311-8215-911476c7bfec" xlink:to="loc_country_US_a481cf7a-cad0-40c6-9d2e-6d0a7b930f66" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_country_CA_bb17ecec-533a-4acd-83a3-579e50648438" xlink:href="https://xbrl.sec.gov/country/2023/country-2023.xsd#country_CA"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_a2e2fab3-c9c7-4311-8215-911476c7bfec" xlink:to="loc_country_CA_bb17ecec-533a-4acd-83a3-579e50648438" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_OtherinternationalMember_06c30541-2cd0-4916-99ef-e6463712e00c" xlink:href="mtrx-20240331.xsd#mtrx_OtherinternationalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_a2e2fab3-c9c7-4311-8215-911476c7bfec" xlink:to="loc_mtrx_OtherinternationalMember_06c30541-2cd0-4916-99ef-e6463712e00c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_9ea1654e-27ee-4c12-8ba9-8f7ee56f0923" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_befd3508-4915-49de-b24a-c52c3c06d3db" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_9ea1654e-27ee-4c12-8ba9-8f7ee56f0923" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RevenueSummaryofRevenuebyContractTypesDetails" xlink:type="simple" xlink:href="mtrx-20240331.xsd#RevenueSummaryofRevenuebyContractTypesDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/RevenueSummaryofRevenuebyContractTypesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueLineItems_efdbd6bc-3e00-4488-93cd-c668e31c9cf6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_48215e7e-9e47-4818-8ebb-d9584f9d41e7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_efdbd6bc-3e00-4488-93cd-c668e31c9cf6" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_48215e7e-9e47-4818-8ebb-d9584f9d41e7" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_4041742d-d7af-4051-aa85-6affe1d3bf0a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ContractWithCustomerBasisOfPricingAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_48215e7e-9e47-4818-8ebb-d9584f9d41e7" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_4041742d-d7af-4051-aa85-6affe1d3bf0a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_4041742d-d7af-4051-aa85-6affe1d3bf0a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ContractWithCustomerBasisOfPricingDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_4041742d-d7af-4051-aa85-6affe1d3bf0a" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_4041742d-d7af-4051-aa85-6affe1d3bf0a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_36170dd2-a109-4629-862b-ee26cd1d5685" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ContractWithCustomerBasisOfPricingDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_4041742d-d7af-4051-aa85-6affe1d3bf0a" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_36170dd2-a109-4629-862b-ee26cd1d5685" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FixedPriceContractMember_62a9096b-a3ed-48fc-9650-594b8837cc77" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FixedPriceContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_36170dd2-a109-4629-862b-ee26cd1d5685" xlink:to="loc_us-gaap_FixedPriceContractMember_62a9096b-a3ed-48fc-9650-594b8837cc77" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeAndMaterialsContractMember_0ee91714-12f9-483d-933f-115f49d2aedb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TimeAndMaterialsContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_36170dd2-a109-4629-862b-ee26cd1d5685" xlink:to="loc_us-gaap_TimeAndMaterialsContractMember_0ee91714-12f9-483d-933f-115f49d2aedb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_99e87b35-f736-4796-ab40-9b01aef6c676" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_efdbd6bc-3e00-4488-93cd-c668e31c9cf6" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_99e87b35-f736-4796-ab40-9b01aef6c676" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/PropertyPlantandEquipmentDetails" xlink:type="simple" xlink:href="mtrx-20240331.xsd#PropertyPlantandEquipmentDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/PropertyPlantandEquipmentDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentLineItems_f1da74d7-5a08-412f-af8d-583a67794cc5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_fbfc8fb8-1915-4dc7-bb23-92f28c773cac" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfPropertyPlantAndEquipmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_f1da74d7-5a08-412f-af8d-583a67794cc5" xlink:to="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_fbfc8fb8-1915-4dc7-bb23-92f28c773cac" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_2bdc1834-d48a-4ab0-9f65-4510d3a624d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_fbfc8fb8-1915-4dc7-bb23-92f28c773cac" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_2bdc1834-d48a-4ab0-9f65-4510d3a624d4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_2bdc1834-d48a-4ab0-9f65-4510d3a624d4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_2bdc1834-d48a-4ab0-9f65-4510d3a624d4" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_2bdc1834-d48a-4ab0-9f65-4510d3a624d4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_28b3afad-9884-4a9a-a018-a558e6d7f234" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_2bdc1834-d48a-4ab0-9f65-4510d3a624d4" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_28b3afad-9884-4a9a-a018-a558e6d7f234" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_CatoosaFacilityDisposalMember_b70dd969-8f57-4517-97a6-6171f7cdfb4e" xlink:href="mtrx-20240331.xsd#mtrx_CatoosaFacilityDisposalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_28b3afad-9884-4a9a-a018-a558e6d7f234" xlink:to="loc_mtrx_CatoosaFacilityDisposalMember_b70dd969-8f57-4517-97a6-6171f7cdfb4e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_BurlingtonOfficeMember_88dad5b2-8cf2-4a2c-8645-80129ef68212" xlink:href="mtrx-20240331.xsd#mtrx_BurlingtonOfficeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_28b3afad-9884-4a9a-a018-a558e6d7f234" xlink:to="loc_mtrx_BurlingtonOfficeMember_88dad5b2-8cf2-4a2c-8645-80129ef68212" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_BakersfieldFacilityPurchaseMember_f531f6f2-8d59-4aab-8128-57635f081bc0" xlink:href="mtrx-20240331.xsd#mtrx_BakersfieldFacilityPurchaseMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_28b3afad-9884-4a9a-a018-a558e6d7f234" xlink:to="loc_mtrx_BakersfieldFacilityPurchaseMember_f531f6f2-8d59-4aab-8128-57635f081bc0" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfProductiveAssets_12e58f2d-0392-4b7c-8821-59e007ebc44a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromSaleOfProductiveAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_f1da74d7-5a08-412f-af8d-583a67794cc5" xlink:to="loc_us-gaap_ProceedsFromSaleOfProductiveAssets_12e58f2d-0392-4b7c-8821-59e007ebc44a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_62fc23ce-5a3c-4cd8-b1c4-6352729fd0fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossOnSaleOfPropertyPlantEquipment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_f1da74d7-5a08-412f-af8d-583a67794cc5" xlink:to="loc_us-gaap_GainLossOnSaleOfPropertyPlantEquipment_62fc23ce-5a3c-4cd8-b1c4-6352729fd0fd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireBuildings_286365fa-c71f-4daf-82af-064874aef6b9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireBuildings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_f1da74d7-5a08-412f-af8d-583a67794cc5" xlink:to="loc_us-gaap_PaymentsToAcquireBuildings_286365fa-c71f-4daf-82af-064874aef6b9" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail" xlink:type="simple" xlink:href="mtrx-20240331.xsd#CommitmentsandContingenciesAdditionalInformationDetail"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossContingenciesLineItems_98160ad3-ae3f-433b-bc69-50b1d0490862" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LossContingenciesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossContingenciesTable_9df46548-5acc-4de0-9668-07fe9bcbd315" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LossContingenciesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LossContingenciesLineItems_98160ad3-ae3f-433b-bc69-50b1d0490862" xlink:to="loc_us-gaap_LossContingenciesTable_9df46548-5acc-4de0-9668-07fe9bcbd315" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis_9b08749e-781e-494e-aa8e-cdef6aa3e1ea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LossContingenciesTable_9df46548-5acc-4de0-9668-07fe9bcbd315" xlink:to="loc_us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis_9b08749e-781e-494e-aa8e-cdef6aa3e1ea" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProjectMember_9b08749e-781e-494e-aa8e-cdef6aa3e1ea_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProjectMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis_9b08749e-781e-494e-aa8e-cdef6aa3e1ea" xlink:to="loc_us-gaap_ProjectMember_9b08749e-781e-494e-aa8e-cdef6aa3e1ea_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProjectMember_a9199daa-40b8-4785-9907-0b56ddf0f8ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProjectMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis_9b08749e-781e-494e-aa8e-cdef6aa3e1ea" xlink:to="loc_us-gaap_ProjectMember_a9199daa-40b8-4785-9907-0b56ddf0f8ec" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_IronAndSteelProjectMember_a3e4368c-7498-42c4-8b75-ea2a00a4bf9c" xlink:href="mtrx-20240331.xsd#mtrx_IronAndSteelProjectMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ProjectMember_a9199daa-40b8-4785-9907-0b56ddf0f8ec" xlink:to="loc_mtrx_IronAndSteelProjectMember_a3e4368c-7498-42c4-8b75-ea2a00a4bf9c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_MiningAndMineralsProjectMember_9605b6f2-b0c4-448a-a013-de0cceb94bed" xlink:href="mtrx-20240331.xsd#mtrx_MiningAndMineralsProjectMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ProjectMember_a9199daa-40b8-4785-9907-0b56ddf0f8ec" xlink:to="loc_mtrx_MiningAndMineralsProjectMember_9605b6f2-b0c4-448a-a013-de0cceb94bed" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_CrudeOilTerminalProjectMember_54f905e5-851a-4743-b173-2680b5a46a15" xlink:href="mtrx-20240331.xsd#mtrx_CrudeOilTerminalProjectMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ProjectMember_a9199daa-40b8-4785-9907-0b56ddf0f8ec" xlink:to="loc_mtrx_CrudeOilTerminalProjectMember_54f905e5-851a-4743-b173-2680b5a46a15" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromLegalSettlements_6153b72f-2e30-4e61-9117-199d4255be1a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromLegalSettlements"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_98160ad3-ae3f-433b-bc69-50b1d0490862" xlink:to="loc_us-gaap_ProceedsFromLegalSettlements_6153b72f-2e30-4e61-9117-199d4255be1a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractsReceivableClaimsAndUncertainAmounts_53c11eb3-797c-48a2-8a58-f2b6bc10f192" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ContractsReceivableClaimsAndUncertainAmounts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_98160ad3-ae3f-433b-bc69-50b1d0490862" xlink:to="loc_us-gaap_ContractsReceivableClaimsAndUncertainAmounts_53c11eb3-797c-48a2-8a58-f2b6bc10f192" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformationDetails" xlink:type="simple" xlink:href="mtrx-20240331.xsd#SegmentInformationDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/SegmentInformationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_780fcebd-665d-4605-9fbb-474c9d40e826" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_2fe2ef77-19a2-4742-9bb6-d15f4f411a9f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_780fcebd-665d-4605-9fbb-474c9d40e826" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_2fe2ef77-19a2-4742-9bb6-d15f4f411a9f" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_6f7ee139-33de-43a8-9b58-659217452418" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_2fe2ef77-19a2-4742-9bb6-d15f4f411a9f" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_6f7ee139-33de-43a8-9b58-659217452418" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_6f7ee139-33de-43a8-9b58-659217452418_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_6f7ee139-33de-43a8-9b58-659217452418" xlink:to="loc_us-gaap_SegmentDomain_6f7ee139-33de-43a8-9b58-659217452418_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_a726d563-af33-4a25-ae34-bd69ef6e98fc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_6f7ee139-33de-43a8-9b58-659217452418" xlink:to="loc_us-gaap_SegmentDomain_a726d563-af33-4a25-ae34-bd69ef6e98fc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_StorageAndTerminalSolutionsMember_0e276b68-5d0a-4af6-a0d9-fd807392729c" xlink:href="mtrx-20240331.xsd#mtrx_StorageAndTerminalSolutionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_a726d563-af33-4a25-ae34-bd69ef6e98fc" xlink:to="loc_mtrx_StorageAndTerminalSolutionsMember_0e276b68-5d0a-4af6-a0d9-fd807392729c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_UtilityAndPowerInfrastructureMember_a38aa85e-0ab1-4885-8ba8-f471598089c2" xlink:href="mtrx-20240331.xsd#mtrx_UtilityAndPowerInfrastructureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_a726d563-af33-4a25-ae34-bd69ef6e98fc" xlink:to="loc_mtrx_UtilityAndPowerInfrastructureMember_a38aa85e-0ab1-4885-8ba8-f471598089c2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_ProcessAndIndustrialFacilitiesMember_f2fce3b6-19b9-4f9f-b068-666218f676e5" xlink:href="mtrx-20240331.xsd#mtrx_ProcessAndIndustrialFacilitiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_a726d563-af33-4a25-ae34-bd69ef6e98fc" xlink:to="loc_mtrx_ProcessAndIndustrialFacilitiesMember_f2fce3b6-19b9-4f9f-b068-666218f676e5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateMember_3b0a95fe-0663-4f5f-b99c-b0c255f70eac" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CorporateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_a726d563-af33-4a25-ae34-bd69ef6e98fc" xlink:to="loc_us-gaap_CorporateMember_3b0a95fe-0663-4f5f-b99c-b0c255f70eac" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_UnallocatedCorporateCostsMember_65a261a5-b71d-42e0-81be-1f186d36bfd1" xlink:href="mtrx-20240331.xsd#mtrx_UnallocatedCorporateCostsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_a726d563-af33-4a25-ae34-bd69ef6e98fc" xlink:to="loc_mtrx_UnallocatedCorporateCostsMember_65a261a5-b71d-42e0-81be-1f186d36bfd1" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_22dda5ec-e65d-4be1-96e5-5fe15c6206ce" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_2fe2ef77-19a2-4742-9bb6-d15f4f411a9f" xlink:to="loc_srt_ConsolidationItemsAxis_22dda5ec-e65d-4be1-96e5-5fe15c6206ce" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_22dda5ec-e65d-4be1-96e5-5fe15c6206ce_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_22dda5ec-e65d-4be1-96e5-5fe15c6206ce" xlink:to="loc_srt_ConsolidationItemsDomain_22dda5ec-e65d-4be1-96e5-5fe15c6206ce_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_2ce9f942-677c-4f3f-be7a-4163e85cb2f9" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_22dda5ec-e65d-4be1-96e5-5fe15c6206ce" xlink:to="loc_srt_ConsolidationItemsDomain_2ce9f942-677c-4f3f-be7a-4163e85cb2f9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntersegmentEliminationMember_034ae2ca-d67b-4444-a56c-0ab757e0e275" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IntersegmentEliminationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_2ce9f942-677c-4f3f-be7a-4163e85cb2f9" xlink:to="loc_us-gaap_IntersegmentEliminationMember_034ae2ca-d67b-4444-a56c-0ab757e0e275" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NumberOfReportableSegments_74933754-4ba1-4cae-a8c6-e9d7d4dc4cc0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NumberOfReportableSegments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_780fcebd-665d-4605-9fbb-474c9d40e826" xlink:to="loc_us-gaap_NumberOfReportableSegments_74933754-4ba1-4cae-a8c6-e9d7d4dc4cc0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_3756c746-7f88-481f-ab78-abb381181873" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Revenues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_780fcebd-665d-4605-9fbb-474c9d40e826" xlink:to="loc_us-gaap_Revenues_3756c746-7f88-481f-ab78-abb381181873" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfRevenue_0db0abbc-ad09-4fc9-8243-10ec38dffdc4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CostOfRevenue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_780fcebd-665d-4605-9fbb-474c9d40e826" xlink:to="loc_us-gaap_CostOfRevenue_0db0abbc-ad09-4fc9-8243-10ec38dffdc4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_f7a29ea7-a250-40c6-9cab-511433d4e439" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GrossProfit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_780fcebd-665d-4605-9fbb-474c9d40e826" xlink:to="loc_us-gaap_GrossProfit_f7a29ea7-a250-40c6-9cab-511433d4e439" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_6498900d-675e-41ab-b297-5bc2e55e04fb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_780fcebd-665d-4605-9fbb-474c9d40e826" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_6498900d-675e-41ab-b297-5bc2e55e04fb" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillImpairmentLoss_cd31f931-a2e2-4174-8b89-2060bd249f04" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GoodwillImpairmentLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_780fcebd-665d-4605-9fbb-474c9d40e826" xlink:to="loc_us-gaap_GoodwillImpairmentLoss_cd31f931-a2e2-4174-8b89-2060bd249f04" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCosts_41c1d1d1-43de-4279-ada7-5800a6a8fd28" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestructuringCosts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_780fcebd-665d-4605-9fbb-474c9d40e826" xlink:to="loc_us-gaap_RestructuringCosts_41c1d1d1-43de-4279-ada7-5800a6a8fd28" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_efda8661-954f-451b-a4c7-a5bcf877aa65" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_780fcebd-665d-4605-9fbb-474c9d40e826" xlink:to="loc_us-gaap_OperatingIncomeLoss_efda8661-954f-451b-a4c7-a5bcf877aa65" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingDisclosureTextBlock_3b63a1ae-630c-47bb-9103-28aaa2a0523f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentReportingDisclosureTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_780fcebd-665d-4605-9fbb-474c9d40e826" xlink:to="loc_us-gaap_SegmentReportingDisclosureTextBlock_3b63a1ae-630c-47bb-9103-28aaa2a0523f" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_2777dffa-b8ba-4180-9bb2-990a671565ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Assets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_780fcebd-665d-4605-9fbb-474c9d40e826" xlink:to="loc_us-gaap_Assets_2777dffa-b8ba-4180-9bb2-990a671565ec" xlink:type="arc" order="9"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RestructuringCostsDetails" xlink:type="simple" xlink:href="mtrx-20240331.xsd#RestructuringCostsDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/RestructuringCostsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_9a976727-2c69-4c6e-b072-99ba207bdacd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestructuringCostAndReserveLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_87b26e8b-b7e6-4a25-8620-f3bb050fc4bb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_9a976727-2c69-4c6e-b072-99ba207bdacd" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_87b26e8b-b7e6-4a25-8620-f3bb050fc4bb" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveAxis_46e0fbb9-e16f-425c-ad60-66512363ad5b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestructuringCostAndReserveAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_87b26e8b-b7e6-4a25-8620-f3bb050fc4bb" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_46e0fbb9-e16f-425c-ad60-66512363ad5b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_46e0fbb9-e16f-425c-ad60-66512363ad5b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TypeOfRestructuringDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_46e0fbb9-e16f-425c-ad60-66512363ad5b" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_46e0fbb9-e16f-425c-ad60-66512363ad5b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_e893a9ae-39a4-4964-8002-84a33e1ac29b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TypeOfRestructuringDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_46e0fbb9-e16f-425c-ad60-66512363ad5b" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_e893a9ae-39a4-4964-8002-84a33e1ac29b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeSeveranceMember_915589d9-9430-495d-b04b-026d3870a99c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeSeveranceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_e893a9ae-39a4-4964-8002-84a33e1ac29b" xlink:to="loc_us-gaap_EmployeeSeveranceMember_915589d9-9430-495d-b04b-026d3870a99c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCharges_ce296399-ba90-44fd-82f1-07271bbf7cfe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestructuringCharges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_9a976727-2c69-4c6e-b072-99ba207bdacd" xlink:to="loc_us-gaap_RestructuringCharges_ce296399-ba90-44fd-82f1-07271bbf7cfe" xlink:type="arc" order="0"/>
  </link:definitionLink>
</link:linkbase>
