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

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2025 Workiva-->
<!--r:178e609b-2040-4223-9301-cc05a95c504f,g:19de9c91-526b-45b7-ab16-d440efe39b34-->
<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-20250930.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_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_038d77fe-aee9-473a-8801-dfc77cb3d3dd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_us-gaap_StatementTable_038d77fe-aee9-473a-8801-dfc77cb3d3dd" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_4ca3f1ab-a6a7-4063-8e7a-0e03476ba618" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_038d77fe-aee9-473a-8801-dfc77cb3d3dd" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_4ca3f1ab-a6a7-4063-8e7a-0e03476ba618" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_4ca3f1ab-a6a7-4063-8e7a-0e03476ba618_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_4ca3f1ab-a6a7-4063-8e7a-0e03476ba618" xlink:to="loc_us-gaap_EquityComponentDomain_4ca3f1ab-a6a7-4063-8e7a-0e03476ba618_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_0161df23-1163-4484-9794-cc7e6cb7a193" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_4ca3f1ab-a6a7-4063-8e7a-0e03476ba618" xlink:to="loc_us-gaap_EquityComponentDomain_0161df23-1163-4484-9794-cc7e6cb7a193" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_4d5a23bb-7711-491f-99d4-7d1fab3bacc2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_0161df23-1163-4484-9794-cc7e6cb7a193" xlink:to="loc_us-gaap_CommonStockMember_4d5a23bb-7711-491f-99d4-7d1fab3bacc2" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_09d13c6b-3d1e-4086-970b-c030f969e9b9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AdditionalPaidInCapitalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_0161df23-1163-4484-9794-cc7e6cb7a193" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_09d13c6b-3d1e-4086-970b-c030f969e9b9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsMember_b253d543-9d33-49a7-adcd-184942391e95" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RetainedEarningsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_0161df23-1163-4484-9794-cc7e6cb7a193" xlink:to="loc_us-gaap_RetainedEarningsMember_b253d543-9d33-49a7-adcd-184942391e95" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_087378db-16b4-432d-998c-d82d319d7932" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_0161df23-1163-4484-9794-cc7e6cb7a193" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_087378db-16b4-432d-998c-d82d319d7932" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonMember_e1d6989e-c5e9-4bf9-ae71-b6132275a79e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TreasuryStockCommonMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_0161df23-1163-4484-9794-cc7e6cb7a193" xlink:to="loc_us-gaap_TreasuryStockCommonMember_e1d6989e-c5e9-4bf9-ae71-b6132275a79e" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_7807387f-79a5-42a7-9012-f30fbaf46e09" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TreasuryStockSharesAcquired"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_7807387f-79a5-42a7-9012-f30fbaf46e09" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans_0852eb23-8c5d-4d6e-b5e6-41f3f1131305" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans_0852eb23-8c5d-4d6e-b5e6-41f3f1131305" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedStockValueSharesIssuedNetOfTaxWithholdings_2a091da6-157f-4cda-87f6-dc712e79affa" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestrictedStockValueSharesIssuedNetOfTaxWithholdings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_us-gaap_RestrictedStockValueSharesIssuedNetOfTaxWithholdings_2a091da6-157f-4cda-87f6-dc712e79affa" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedStockSharesIssuedNetOfSharesForTaxWithholdings_0542b823-a460-42fa-ad07-1eaf9a2ea8ac" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestrictedStockSharesIssuedNetOfSharesForTaxWithholdings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_us-gaap_RestrictedStockSharesIssuedNetOfSharesForTaxWithholdings_0542b823-a460-42fa-ad07-1eaf9a2ea8ac" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan_0ce3f4ce-0fbf-4afe-8876-5284a546c0a4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan_0ce3f4ce-0fbf-4afe-8876-5284a546c0a4" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonShares_7f90f0ff-e229-48b1-9c74-63b757c8b128" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TreasuryStockCommonShares"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_us-gaap_TreasuryStockCommonShares_7f90f0ff-e229-48b1-9c74-63b757c8b128" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_da718738-8d2a-4641-b6bb-f0ecd0766663" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_da718738-8d2a-4641-b6bb-f0ecd0766663" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_518a8eb3-4001-4873-929c-534f749838c6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_us-gaap_NetIncomeLoss_518a8eb3-4001-4873-929c-534f749838c6" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_ff93c6d6-436f-404d-83bc-66bd2afa1b14" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_ff93c6d6-436f-404d-83bc-66bd2afa1b14" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_a169fc53-8931-44af-a001-982fed96337d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_a169fc53-8931-44af-a001-982fed96337d" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_OtherTreasurySharePurchases_69b60f8b-e0ad-4793-9fb5-22eec0919561" xlink:href="mtrx-20250930.xsd#mtrx_OtherTreasurySharePurchases"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_mtrx_OtherTreasurySharePurchases_69b60f8b-e0ad-4793-9fb5-22eec0919561" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_4fccb5d4-de92-4c56-afa4-82c4aa918ae1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_4fccb5d4-de92-4c56-afa4-82c4aa918ae1" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_d17ecfe3-4c08-49e4-869d-7875069eff41" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6cd9213f-1ea5-4d35-8ebe-f1dc8811379d" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_d17ecfe3-4c08-49e4-869d-7875069eff41" xlink:type="arc" order="12"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RevenueNarrativeDetails" xlink:type="simple" xlink:href="mtrx-20250930.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_05aa75ce-a533-4f11-8238-cad4946555ca" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_f0f63009-7375-413e-98d4-80f25f8e53ce" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_05aa75ce-a533-4f11-8238-cad4946555ca" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_f0f63009-7375-413e-98d4-80f25f8e53ce" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_90e77c47-d108-445d-a107-04d7430c7997" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_f0f63009-7375-413e-98d4-80f25f8e53ce" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_90e77c47-d108-445d-a107-04d7430c7997" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_90e77c47-d108-445d-a107-04d7430c7997_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_90e77c47-d108-445d-a107-04d7430c7997" xlink:to="loc_us-gaap_SegmentDomain_90e77c47-d108-445d-a107-04d7430c7997_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_827d4022-a24b-4d87-9ddd-69e4acb6d4a5" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_90e77c47-d108-445d-a107-04d7430c7997" xlink:to="loc_us-gaap_SegmentDomain_827d4022-a24b-4d87-9ddd-69e4acb6d4a5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueRemainingPerformanceObligation_43e35337-add3-4252-8c06-bb2f644bee8d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RevenueRemainingPerformanceObligation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_05aa75ce-a533-4f11-8238-cad4946555ca" xlink:to="loc_us-gaap_RevenueRemainingPerformanceObligation_43e35337-add3-4252-8c06-bb2f644bee8d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_Performanceobligationstoberecognizedasrevenuewithinnexttwelvemonths_f742cc4e-03df-4757-a2d9-1b724c6709c9" xlink:href="mtrx-20250930.xsd#mtrx_Performanceobligationstoberecognizedasrevenuewithinnexttwelvemonths"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_05aa75ce-a533-4f11-8238-cad4946555ca" xlink:to="loc_mtrx_Performanceobligationstoberecognizedasrevenuewithinnexttwelvemonths_f742cc4e-03df-4757-a2d9-1b724c6709c9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerLiabilityRevenueRecognized_9fe8ccff-1095-4fae-acd6-bc4934e521e4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ContractWithCustomerLiabilityRevenueRecognized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_05aa75ce-a533-4f11-8238-cad4946555ca" xlink:to="loc_us-gaap_ContractWithCustomerLiabilityRevenueRecognized_9fe8ccff-1095-4fae-acd6-bc4934e521e4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConstructionContractorReceivableRetainageYearOne_464eb92c-fa56-46ab-8d66-a40c273b986e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ConstructionContractorReceivableRetainageYearOne"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_05aa75ce-a533-4f11-8238-cad4946555ca" xlink:to="loc_us-gaap_ConstructionContractorReceivableRetainageYearOne_464eb92c-fa56-46ab-8d66-a40c273b986e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConstructionContractorReceivableRetainageAfterYearOne_01ee2857-e890-499b-97d4-e74fc8ed6d2e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ConstructionContractorReceivableRetainageAfterYearOne"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_05aa75ce-a533-4f11-8238-cad4946555ca" xlink:to="loc_us-gaap_ConstructionContractorReceivableRetainageAfterYearOne_01ee2857-e890-499b-97d4-e74fc8ed6d2e" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnapprovedChangeOrdersAmount_288fe1e7-3ea7-4f6b-892f-88026330c6c1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_UnapprovedChangeOrdersAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_05aa75ce-a533-4f11-8238-cad4946555ca" xlink:to="loc_us-gaap_UnapprovedChangeOrdersAmount_288fe1e7-3ea7-4f6b-892f-88026330c6c1" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RevenueSummaryofRevenuebyGeographicAreasDetails" xlink:type="simple" xlink:href="mtrx-20250930.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_47692965-2179-44de-8b58-608468a92031" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_2a39dcf0-26ea-4799-b642-098748405f8f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_47692965-2179-44de-8b58-608468a92031" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_2a39dcf0-26ea-4799-b642-098748405f8f" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StatementGeographicalAxis_b40b5af3-da51-4c92-8d40-8c4d4e3897be" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_StatementGeographicalAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_2a39dcf0-26ea-4799-b642-098748405f8f" xlink:to="loc_srt_StatementGeographicalAxis_b40b5af3-da51-4c92-8d40-8c4d4e3897be" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_b40b5af3-da51-4c92-8d40-8c4d4e3897be_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_b40b5af3-da51-4c92-8d40-8c4d4e3897be" xlink:to="loc_srt_SegmentGeographicalDomain_b40b5af3-da51-4c92-8d40-8c4d4e3897be_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_ba9fd42f-fd71-4629-a919-d748660d67cf" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_b40b5af3-da51-4c92-8d40-8c4d4e3897be" xlink:to="loc_srt_SegmentGeographicalDomain_ba9fd42f-fd71-4629-a919-d748660d67cf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_country_US_23ccd9f9-e6f2-40f3-b9b4-7c91c671c3b8" xlink:href="https://xbrl.sec.gov/country/2025/country-2025.xsd#country_US"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_ba9fd42f-fd71-4629-a919-d748660d67cf" xlink:to="loc_country_US_23ccd9f9-e6f2-40f3-b9b4-7c91c671c3b8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_country_CA_824972f8-3f6e-4840-b604-bd4082479c0e" xlink:href="https://xbrl.sec.gov/country/2025/country-2025.xsd#country_CA"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_ba9fd42f-fd71-4629-a919-d748660d67cf" xlink:to="loc_country_CA_824972f8-3f6e-4840-b604-bd4082479c0e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_OtherinternationalMember_b0db1454-db5a-47ac-b183-78ff65526052" xlink:href="mtrx-20250930.xsd#mtrx_OtherinternationalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_ba9fd42f-fd71-4629-a919-d748660d67cf" xlink:to="loc_mtrx_OtherinternationalMember_b0db1454-db5a-47ac-b183-78ff65526052" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_243c5529-4cce-4082-bae2-ec428a43054e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_47692965-2179-44de-8b58-608468a92031" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_243c5529-4cce-4082-bae2-ec428a43054e" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RevenueSummaryofRevenuebyContractTypesDetails" xlink:type="simple" xlink:href="mtrx-20250930.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_839f72a8-6f7f-4fc1-9d81-f98478180721" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_88b433ef-980d-4ace-b92e-c00d4b945f02" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_839f72a8-6f7f-4fc1-9d81-f98478180721" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_88b433ef-980d-4ace-b92e-c00d4b945f02" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_d19046f7-75c3-408e-80b9-2f79582c6e02" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ContractWithCustomerBasisOfPricingAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_88b433ef-980d-4ace-b92e-c00d4b945f02" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_d19046f7-75c3-408e-80b9-2f79582c6e02" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_d19046f7-75c3-408e-80b9-2f79582c6e02_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ContractWithCustomerBasisOfPricingDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_d19046f7-75c3-408e-80b9-2f79582c6e02" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_d19046f7-75c3-408e-80b9-2f79582c6e02_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_1a2419c2-a242-4b0a-ac24-ea810cb0c4ae" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ContractWithCustomerBasisOfPricingDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_d19046f7-75c3-408e-80b9-2f79582c6e02" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_1a2419c2-a242-4b0a-ac24-ea810cb0c4ae" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FixedPriceContractMember_d06c0813-4438-4ab3-8348-573b370eea57" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FixedPriceContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_1a2419c2-a242-4b0a-ac24-ea810cb0c4ae" xlink:to="loc_us-gaap_FixedPriceContractMember_d06c0813-4438-4ab3-8348-573b370eea57" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeAndMaterialsContractMember_41024e8a-75c9-4aa3-a4d7-e499b21bdd2c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TimeAndMaterialsContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_1a2419c2-a242-4b0a-ac24-ea810cb0c4ae" xlink:to="loc_us-gaap_TimeAndMaterialsContractMember_41024e8a-75c9-4aa3-a4d7-e499b21bdd2c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StatementGeographicalAxis_b43c6849-e0b3-4c18-bc25-3b20e28c7f21" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_StatementGeographicalAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_88b433ef-980d-4ace-b92e-c00d4b945f02" xlink:to="loc_srt_StatementGeographicalAxis_b43c6849-e0b3-4c18-bc25-3b20e28c7f21" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_b43c6849-e0b3-4c18-bc25-3b20e28c7f21_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_b43c6849-e0b3-4c18-bc25-3b20e28c7f21" xlink:to="loc_srt_SegmentGeographicalDomain_b43c6849-e0b3-4c18-bc25-3b20e28c7f21_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_38e6d554-a442-48e9-aee0-be3205ec747d" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_b43c6849-e0b3-4c18-bc25-3b20e28c7f21" xlink:to="loc_srt_SegmentGeographicalDomain_38e6d554-a442-48e9-aee0-be3205ec747d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_OtherinternationalMember_6d9f917c-6e38-4ddf-942e-1c44f917f3d4" xlink:href="mtrx-20250930.xsd#mtrx_OtherinternationalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_38e6d554-a442-48e9-aee0-be3205ec747d" xlink:to="loc_mtrx_OtherinternationalMember_6d9f917c-6e38-4ddf-942e-1c44f917f3d4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_0a0cc692-385a-43ab-81da-05fe9632653c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_839f72a8-6f7f-4fc1-9d81-f98478180721" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_0a0cc692-385a-43ab-81da-05fe9632653c" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail" xlink:type="simple" xlink:href="mtrx-20250930.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_d7ccb3ea-22c6-432e-aee7-f3d48c42111d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LossContingenciesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossContingenciesTable_8ff60c3c-26fc-4f9e-a4b5-1914e8c5935a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LossContingenciesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LossContingenciesLineItems_d7ccb3ea-22c6-432e-aee7-f3d48c42111d" xlink:to="loc_us-gaap_LossContingenciesTable_8ff60c3c-26fc-4f9e-a4b5-1914e8c5935a" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis_c977e6d9-cb52-4717-84c9-796f1e215311" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LossContingenciesTable_8ff60c3c-26fc-4f9e-a4b5-1914e8c5935a" xlink:to="loc_us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis_c977e6d9-cb52-4717-84c9-796f1e215311" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProjectMember_c977e6d9-cb52-4717-84c9-796f1e215311_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ProjectMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis_c977e6d9-cb52-4717-84c9-796f1e215311" xlink:to="loc_us-gaap_ProjectMember_c977e6d9-cb52-4717-84c9-796f1e215311_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProjectMember_fdcba3db-e6c1-4fa1-b85e-684f1e99009b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ProjectMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis_c977e6d9-cb52-4717-84c9-796f1e215311" xlink:to="loc_us-gaap_ProjectMember_fdcba3db-e6c1-4fa1-b85e-684f1e99009b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_MiningAndMineralsProjectMember_546f1ef1-a41a-4679-ac02-412c0ed79a90" xlink:href="mtrx-20250930.xsd#mtrx_MiningAndMineralsProjectMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ProjectMember_fdcba3db-e6c1-4fa1-b85e-684f1e99009b" xlink:to="loc_mtrx_MiningAndMineralsProjectMember_546f1ef1-a41a-4679-ac02-412c0ed79a90" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_CrudeOilTerminalProjectMember_74d8fe83-df57-4a13-96ae-3a501338a6eb" xlink:href="mtrx-20250930.xsd#mtrx_CrudeOilTerminalProjectMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ProjectMember_fdcba3db-e6c1-4fa1-b85e-684f1e99009b" xlink:to="loc_mtrx_CrudeOilTerminalProjectMember_74d8fe83-df57-4a13-96ae-3a501338a6eb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeAxis_897258f1-50c8-4f24-8329-a1a51ed618d9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SubsequentEventTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LossContingenciesTable_8ff60c3c-26fc-4f9e-a4b5-1914e8c5935a" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_897258f1-50c8-4f24-8329-a1a51ed618d9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_897258f1-50c8-4f24-8329-a1a51ed618d9_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_897258f1-50c8-4f24-8329-a1a51ed618d9" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_897258f1-50c8-4f24-8329-a1a51ed618d9_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_2bc185fc-7a47-45b8-ae2a-fa53b1ae4172" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_897258f1-50c8-4f24-8329-a1a51ed618d9" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_2bc185fc-7a47-45b8-ae2a-fa53b1ae4172" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractsReceivableClaimsAndUncertainAmounts_0ed478e5-6f87-4e99-84c6-d6899b7d66c3" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ContractsReceivableClaimsAndUncertainAmounts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_d7ccb3ea-22c6-432e-aee7-f3d48c42111d" xlink:to="loc_us-gaap_ContractsReceivableClaimsAndUncertainAmounts_0ed478e5-6f87-4e99-84c6-d6899b7d66c3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossContingencyActionsTakenByDefendant_cceb6a65-6177-469e-9955-6be618d21268" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LossContingencyActionsTakenByDefendant"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_d7ccb3ea-22c6-432e-aee7-f3d48c42111d" xlink:to="loc_us-gaap_LossContingencyActionsTakenByDefendant_cceb6a65-6177-469e-9955-6be618d21268" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_LossContingencyActionsTakenByDefendantMaximum_7794f9e9-6f8f-492a-8603-0a0c74ed2f28" xlink:href="mtrx-20250930.xsd#mtrx_LossContingencyActionsTakenByDefendantMaximum"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_d7ccb3ea-22c6-432e-aee7-f3d48c42111d" xlink:to="loc_mtrx_LossContingencyActionsTakenByDefendantMaximum_7794f9e9-6f8f-492a-8603-0a0c74ed2f28" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_LossContingencyActionsTakenByDefendantMinimum_bd8510a2-3607-4706-a99c-916741de3901" xlink:href="mtrx-20250930.xsd#mtrx_LossContingencyActionsTakenByDefendantMinimum"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_d7ccb3ea-22c6-432e-aee7-f3d48c42111d" xlink:to="loc_mtrx_LossContingencyActionsTakenByDefendantMinimum_bd8510a2-3607-4706-a99c-916741de3901" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossContingencyActionsTakenByPlaintiff_16f1b461-3ae3-417d-ada5-61e95241ca10" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LossContingencyActionsTakenByPlaintiff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_d7ccb3ea-22c6-432e-aee7-f3d48c42111d" xlink:to="loc_us-gaap_LossContingencyActionsTakenByPlaintiff_16f1b461-3ae3-417d-ada5-61e95241ca10" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformationDetails" xlink:type="simple" xlink:href="mtrx-20250930.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_c2d87a01-10bc-4481-a350-60b0de947cc8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_774cff20-7584-423b-b00e-f05e7d2ecdb0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_c2d87a01-10bc-4481-a350-60b0de947cc8" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_774cff20-7584-423b-b00e-f05e7d2ecdb0" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_8f7b3200-cf4b-4d71-b562-c1684d110ec1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_774cff20-7584-423b-b00e-f05e7d2ecdb0" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_8f7b3200-cf4b-4d71-b562-c1684d110ec1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_8f7b3200-cf4b-4d71-b562-c1684d110ec1_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_8f7b3200-cf4b-4d71-b562-c1684d110ec1" xlink:to="loc_us-gaap_SegmentDomain_8f7b3200-cf4b-4d71-b562-c1684d110ec1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_b2d2eb0a-f070-4ee6-808a-15a675531262" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_8f7b3200-cf4b-4d71-b562-c1684d110ec1" xlink:to="loc_us-gaap_SegmentDomain_b2d2eb0a-f070-4ee6-808a-15a675531262" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_StorageAndTerminalSolutionsMember_238bffb4-8f20-46f4-946f-a80f79f4ade8" xlink:href="mtrx-20250930.xsd#mtrx_StorageAndTerminalSolutionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_b2d2eb0a-f070-4ee6-808a-15a675531262" xlink:to="loc_mtrx_StorageAndTerminalSolutionsMember_238bffb4-8f20-46f4-946f-a80f79f4ade8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_UtilityAndPowerInfrastructureMember_e2081dce-173b-46ba-87bf-29047fcd069d" xlink:href="mtrx-20250930.xsd#mtrx_UtilityAndPowerInfrastructureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_b2d2eb0a-f070-4ee6-808a-15a675531262" xlink:to="loc_mtrx_UtilityAndPowerInfrastructureMember_e2081dce-173b-46ba-87bf-29047fcd069d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_ProcessAndIndustrialFacilitiesMember_354ae085-76e7-4304-9225-9ff6dc3a4742" xlink:href="mtrx-20250930.xsd#mtrx_ProcessAndIndustrialFacilitiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_b2d2eb0a-f070-4ee6-808a-15a675531262" xlink:to="loc_mtrx_ProcessAndIndustrialFacilitiesMember_354ae085-76e7-4304-9225-9ff6dc3a4742" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateMember_8c496b12-a89d-4188-af22-0b4444dc01b3" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CorporateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_b2d2eb0a-f070-4ee6-808a-15a675531262" xlink:to="loc_us-gaap_CorporateMember_8c496b12-a89d-4188-af22-0b4444dc01b3" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_6aedb26d-e0c7-4ff8-ad09-93cfd5b9434c" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_774cff20-7584-423b-b00e-f05e7d2ecdb0" xlink:to="loc_srt_ConsolidationItemsAxis_6aedb26d-e0c7-4ff8-ad09-93cfd5b9434c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_6aedb26d-e0c7-4ff8-ad09-93cfd5b9434c_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_6aedb26d-e0c7-4ff8-ad09-93cfd5b9434c" xlink:to="loc_srt_ConsolidationItemsDomain_6aedb26d-e0c7-4ff8-ad09-93cfd5b9434c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_fcb35be8-ba3d-412f-b34f-9b0e011d5319" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_6aedb26d-e0c7-4ff8-ad09-93cfd5b9434c" xlink:to="loc_srt_ConsolidationItemsDomain_fcb35be8-ba3d-412f-b34f-9b0e011d5319" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntersegmentEliminationMember_e87768f7-5642-4de6-bbbf-1c248788b936" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IntersegmentEliminationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_fcb35be8-ba3d-412f-b34f-9b0e011d5319" xlink:to="loc_us-gaap_IntersegmentEliminationMember_e87768f7-5642-4de6-bbbf-1c248788b936" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_99872999-215f-4585-bd68-1b58d3490dca" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_Revenues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_c2d87a01-10bc-4481-a350-60b0de947cc8" xlink:to="loc_us-gaap_Revenues_99872999-215f-4585-bd68-1b58d3490dca" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_a35ae55b-5860-47fe-9c32-875bdd8a3943" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_c2d87a01-10bc-4481-a350-60b0de947cc8" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_a35ae55b-5860-47fe-9c32-875bdd8a3943" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_fffb09e5-1a7b-46fa-ae95-d1996859b7b7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_GrossProfit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_c2d87a01-10bc-4481-a350-60b0de947cc8" xlink:to="loc_us-gaap_GrossProfit_fffb09e5-1a7b-46fa-ae95-d1996859b7b7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_fd89bb6d-14f9-4ad9-99ff-3ff139a40bc0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_c2d87a01-10bc-4481-a350-60b0de947cc8" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_fd89bb6d-14f9-4ad9-99ff-3ff139a40bc0" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCosts_9c131f54-2e5f-4f17-876c-080cae775a1a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringCosts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_c2d87a01-10bc-4481-a350-60b0de947cc8" xlink:to="loc_us-gaap_RestructuringCosts_9c131f54-2e5f-4f17-876c-080cae775a1a" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_be669170-c88b-4853-8966-e3dc82fb766d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_c2d87a01-10bc-4481-a350-60b0de947cc8" xlink:to="loc_us-gaap_OperatingIncomeLoss_be669170-c88b-4853-8966-e3dc82fb766d" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingDisclosureTextBlock_a02b1b1f-8403-4bd1-b3cf-d29ceb70fedf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentReportingDisclosureTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_c2d87a01-10bc-4481-a350-60b0de947cc8" xlink:to="loc_us-gaap_SegmentReportingDisclosureTextBlock_a02b1b1f-8403-4bd1-b3cf-d29ceb70fedf" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentExpenditureAdditionToLongLivedAssets_12d13d5c-fc94-4afe-9784-412591b24ce2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentExpenditureAdditionToLongLivedAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_c2d87a01-10bc-4481-a350-60b0de947cc8" xlink:to="loc_us-gaap_SegmentExpenditureAdditionToLongLivedAssets_12d13d5c-fc94-4afe-9784-412591b24ce2" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_fbe5a05f-fb03-4ab4-b9e0-6e51ab75e484" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_c2d87a01-10bc-4481-a350-60b0de947cc8" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_fbe5a05f-fb03-4ab4-b9e0-6e51ab75e484" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_540dcfe2-58c1-4131-a14a-254a4a8ac805" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_Assets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_c2d87a01-10bc-4481-a350-60b0de947cc8" xlink:to="loc_us-gaap_Assets_540dcfe2-58c1-4131-a14a-254a4a8ac805" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NumberOfReportableSegments_0538bb8f-6123-42d9-8bba-8ee5969827c8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NumberOfReportableSegments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_c2d87a01-10bc-4481-a350-60b0de947cc8" xlink:to="loc_us-gaap_NumberOfReportableSegments_0538bb8f-6123-42d9-8bba-8ee5969827c8" xlink:type="arc" order="10"/>
  </link:definitionLink>
</link:linkbase>
