<?xml version="1.0" encoding="US-ASCII"?>
<!-- Generated by Broadridge Transform (tm) - http://www.broadridge.com -->
<!-- Created: Tue Jun 02 15:27:59 UTC 2026 -->
<linkbase xmlns="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns:xbrldt="http://xbrl.org/2005/xbrldt">
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ConsolidatedBalanceSheet" roleURI="http://www.rexamerican.com/role/ConsolidatedBalanceSheet"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ConsolidatedBalanceSheet_Parentheticals" roleURI="http://www.rexamerican.com/role/ConsolidatedBalanceSheet_Parentheticals"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ConsolidatedIncomeStatement" roleURI="http://www.rexamerican.com/role/ConsolidatedIncomeStatement"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ConsolidatedIncomeStatement_Parentheticals" roleURI="http://www.rexamerican.com/role/ConsolidatedIncomeStatement_Parentheticals"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ShareholdersEquityType2or3" roleURI="http://www.rexamerican.com/role/ShareholdersEquityType2or3"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ConsolidatedCashFlow" roleURI="http://www.rexamerican.com/role/ConsolidatedCashFlow"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ConsolidatedFinancialStatements" roleURI="http://www.rexamerican.com/role/ConsolidatedFinancialStatements"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_AccountingPolicies" roleURI="http://www.rexamerican.com/role/AccountingPolicies"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_NetSalesandRevenue" roleURI="http://www.rexamerican.com/role/NetSalesandRevenue"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_Leases" roleURI="http://www.rexamerican.com/role/Leases"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_FairValue" roleURI="http://www.rexamerican.com/role/FairValue"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_PropertyandEquipment" roleURI="http://www.rexamerican.com/role/PropertyandEquipment"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_OtherAssets" roleURI="http://www.rexamerican.com/role/OtherAssets"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_AccruedExpensesandOtherCurrentLiabilities" roleURI="http://www.rexamerican.com/role/AccruedExpensesandOtherCurrentLiabilities"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_DerivativeFinancialInstruments" roleURI="http://www.rexamerican.com/role/DerivativeFinancialInstruments"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_Investments" roleURI="http://www.rexamerican.com/role/Investments"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_EmployeeBenefits" roleURI="http://www.rexamerican.com/role/EmployeeBenefits"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_IncomeTaxes" roleURI="http://www.rexamerican.com/role/IncomeTaxes"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_CommitmentsandContingencies" roleURI="http://www.rexamerican.com/role/CommitmentsandContingencies"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_RelatedPartyTransactions" roleURI="http://www.rexamerican.com/role/RelatedPartyTransactions"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_SegmentReporting" roleURI="http://www.rexamerican.com/role/SegmentReporting"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_AccountingPoliciesByPolicy" roleURI="http://www.rexamerican.com/role/AccountingPoliciesByPolicy"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_AccountingPoliciesTables" roleURI="http://www.rexamerican.com/role/AccountingPoliciesTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_NetSalesandRevenueTables" roleURI="http://www.rexamerican.com/role/NetSalesandRevenueTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_LeasesTables" roleURI="http://www.rexamerican.com/role/LeasesTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_FairValueTables" roleURI="http://www.rexamerican.com/role/FairValueTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_PropertyandEquipmentTables" roleURI="http://www.rexamerican.com/role/PropertyandEquipmentTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_OtherAssetsTables" roleURI="http://www.rexamerican.com/role/OtherAssetsTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_AccruedExpensesandOtherCurrentLiabilitiesTables" roleURI="http://www.rexamerican.com/role/AccruedExpensesandOtherCurrentLiabilitiesTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_DerivativeFinancialInstrumentsTables" roleURI="http://www.rexamerican.com/role/DerivativeFinancialInstrumentsTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_InvestmentsTables" roleURI="http://www.rexamerican.com/role/InvestmentsTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_EmployeeBenefitsTables" roleURI="http://www.rexamerican.com/role/EmployeeBenefitsTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_IncomeTaxesTables" roleURI="http://www.rexamerican.com/role/IncomeTaxesTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_SegmentReportingTables" roleURI="http://www.rexamerican.com/role/SegmentReportingTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_SummaryofReclassificationsTable" roleURI="http://www.rexamerican.com/role/SummaryofReclassificationsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ScheduleofInventoryTable" roleURI="http://www.rexamerican.com/role/ScheduleofInventoryTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ScheduleDisaggregatedRevenuebyProductTable" roleURI="http://www.rexamerican.com/role/ScheduleDisaggregatedRevenuebyProductTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ScheduleofLeaseCostTable" roleURI="http://www.rexamerican.com/role/ScheduleofLeaseCostTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_FutureMinimumRentalPaymentsforOperatingLeasesTable" roleURI="http://www.rexamerican.com/role/FutureMinimumRentalPaymentsforOperatingLeasesTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_FutureMinimumRentalPaymentsforFinancingLeasesTable" roleURI="http://www.rexamerican.com/role/FutureMinimumRentalPaymentsforFinancingLeasesTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable" roleURI="http://www.rexamerican.com/role/ScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ComponentsofPropertyandEquipmentTable" roleURI="http://www.rexamerican.com/role/ComponentsofPropertyandEquipmentTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ScheduleofOtherAssetsTable" roleURI="http://www.rexamerican.com/role/ScheduleofOtherAssetsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ScheduleofAccruedExpensesandOtherCurrentLiabilitiesTable" roleURI="http://www.rexamerican.com/role/ScheduleofAccruedExpensesandOtherCurrentLiabilitiesTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_FairValuesforDerivativeFinancialInstrumentsTable" roleURI="http://www.rexamerican.com/role/FairValuesforDerivativeFinancialInstrumentsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_StatementsofOperationsTable" roleURI="http://www.rexamerican.com/role/StatementsofOperationsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ScheduleofEquityMethodInvestmentsTable" roleURI="http://www.rexamerican.com/role/ScheduleofEquityMethodInvestmentsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ScheduleofFinancialInformationforEquityMethodInvestmentsTable" roleURI="http://www.rexamerican.com/role/ScheduleofFinancialInformationforEquityMethodInvestmentsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_NonVestedRestrictedStockAwardActivityTable" roleURI="http://www.rexamerican.com/role/NonVestedRestrictedStockAwardActivityTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_UnrecognizedTaxBenefitsRollForwardTable" roleURI="http://www.rexamerican.com/role/UnrecognizedTaxBenefitsRollForwardTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_UnrecognizedTaxBenefitConsolidatedBalanceSheetTable" roleURI="http://www.rexamerican.com/role/UnrecognizedTaxBenefitConsolidatedBalanceSheetTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ReportableSegmentTable" roleURI="http://www.rexamerican.com/role/ReportableSegmentTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_ConsolidatedFinancialStatementsDetails" roleURI="http://www.rexamerican.com/role/ConsolidatedFinancialStatementsDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_AccountingPoliciesDetails" roleURI="http://www.rexamerican.com/role/AccountingPoliciesDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_NetSalesandRevenueDetails" roleURI="http://www.rexamerican.com/role/NetSalesandRevenueDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_LeasesDetails" roleURI="http://www.rexamerican.com/role/LeasesDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_OtherAssetsDetails" roleURI="http://www.rexamerican.com/role/OtherAssetsDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_DerivativeFinancialInstrumentsDetails" roleURI="http://www.rexamerican.com/role/DerivativeFinancialInstrumentsDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_InvestmentsDetails" roleURI="http://www.rexamerican.com/role/InvestmentsDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_EmployeeBenefitsDetails" roleURI="http://www.rexamerican.com/role/EmployeeBenefitsDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_IncomeTaxesDetails" roleURI="http://www.rexamerican.com/role/IncomeTaxesDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_CommitmentsandContingenciesDetails" roleURI="http://www.rexamerican.com/role/CommitmentsandContingenciesDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_RelatedPartyTransactionsDetails" roleURI="http://www.rexamerican.com/role/RelatedPartyTransactionsDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260430.xsd#rex_r_SegmentReportingDetails" roleURI="http://www.rexamerican.com/role/SegmentReportingDetails"/>
  <roleRef xlink:type="simple" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-roles-2026.xsd#eedm1" roleURI="http://fasb.org/srt/role/srt-eedm/ExtensibleEnumerationLists"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default" arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain" arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension" arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member" arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all" arcroleURI="http://xbrl.org/int/dim/arcrole/all"/>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ConsolidatedBalanceSheet" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_StatementLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_StatementScenarioAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_StatementScenarioAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="srt_StatementScenarioAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScenarioUnspecifiedDomain" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_StatementScenarioAxis" xlink:to="srt_ScenarioUnspecifiedDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScenarioUnspecifiedDomain_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_StatementScenarioAxis" xlink:to="srt_ScenarioUnspecifiedDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_CashAndCashEquivalentsAtCarryingValue" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShortTermInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShortTermInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_ShortTermInvestments" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsReceivableNetCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_AccountsReceivableNetCurrent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryNet" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_InventoryNet" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxesReceivable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxesReceivable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_IncomeTaxesReceivable" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_AssetsCurrent" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentNet" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_PropertyPlantAndEquipmentNet" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseRightOfUseAsset" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_OperatingLeaseRightOfUseAsset" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseRightOfUseAsset" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseRightOfUseAsset"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_FinanceLeaseRightOfUseAsset" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_OtherAssetsNoncurrent" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_EquityMethodInvestments" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Assets" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Assets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_Assets" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsPayableTradeCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsPayableTradeCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_AccountsPayableTradeCurrent" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseLiabilityCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_OperatingLeaseLiabilityCurrent" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_FinanceLeaseLiabilityCurrent" order="15" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccruedLiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_AccruedLiabilitiesCurrent" order="16" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_LiabilitiesCurrent" order="17" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredIncomeTaxLiabilitiesNet" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_DeferredIncomeTaxLiabilitiesNet" order="18" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseLiabilityNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_OperatingLeaseLiabilityNoncurrent" order="19" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_FinanceLeaseLiabilityNoncurrent" order="20" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherLiabilitiesNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_OtherLiabilitiesNoncurrent" order="21" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_LiabilitiesNoncurrent" order="22" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockValue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_CommonStockValue" order="23" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AdditionalPaidInCapitalCommonStock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AdditionalPaidInCapitalCommonStock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_AdditionalPaidInCapitalCommonStock" order="24" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RetainedEarningsAccumulatedDeficit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_RetainedEarningsAccumulatedDeficit" order="25" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquity" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockholdersEquity" order="26" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MinorityInterest" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MinorityInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_MinorityInterest" order="27" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" order="28" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesAndStockholdersEquity" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_LiabilitiesAndStockholdersEquity" order="29" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ConsolidatedBalanceSheet_Parentheticals" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_StatementLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_RelatedPartyTransactionAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_RelatedPartyTransactionAxis" xlink:to="us-gaap_RelatedPartyTransactionDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_RelatedPartyTransactionAxis" xlink:to="us-gaap_RelatedPartyTransactionDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyTransactionDomain" xlink:to="us-gaap_RelatedPartyMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsPayableCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsPayableCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_AccountsPayableCurrent" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ConsolidatedIncomeStatement" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeStatementAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeStatementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Revenues" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Revenues"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_Revenues" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ProductionTaxCreditIncome" xlink:href="rex-20260430.xsd#rex_ProductionTaxCreditIncome"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="rex_ProductionTaxCreditIncome" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CostOfGoodsAndServicesSold" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_CostOfGoodsAndServicesSold" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GrossProfit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GrossProfit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_GrossProfit" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SellingGeneralAndAdministrativeExpense" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_SellingGeneralAndAdministrativeExpense" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromEquityMethodInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossFromEquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_IncomeLossFromEquityMethodInvestments" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InterestAndOtherIncome" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestAndOtherIncome"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_InterestAndOtherIncome" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossAttributableToParent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossAttributableToParent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_IncomeLossAttributableToParent" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProfitLoss" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProfitLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_ProfitLoss" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EarningsPerShareBasic" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EarningsPerShareBasic"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_EarningsPerShareBasic" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EarningsPerShareDiluted" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EarningsPerShareDiluted"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_EarningsPerShareDiluted" order="15" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ConsolidatedIncomeStatement_Parentheticals" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeStatementAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeStatementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartiesAmountInCostOfSales" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartiesAmountInCostOfSales"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_RelatedPartiesAmountInCostOfSales" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ShareholdersEquityType2or3" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_StatementLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementEquityComponentsAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_StatementEquityComponentsAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityComponentDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityComponentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementEquityComponentsAxis" xlink:to="us-gaap_EquityComponentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityComponentDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityComponentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementEquityComponentsAxis" xlink:to="us-gaap_EquityComponentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_CommonStockMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AdditionalPaidInCapitalMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AdditionalPaidInCapitalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_AdditionalPaidInCapitalMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RetainedEarningsMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RetainedEarningsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_RetainedEarningsMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NoncontrollingInterestMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NoncontrollingInterestMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_NoncontrollingInterestMember" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SharesOutstanding" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SharesOutstanding"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_SharesOutstanding" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProfitLoss" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProfitLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_ProfitLoss" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TreasuryStockSharesAcquired" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TreasuryStockSharesAcquired"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_TreasuryStockSharesAcquired" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TreasuryStockValueAcquiredCostMethod" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TreasuryStockValueAcquiredCostMethod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_TreasuryStockValueAcquiredCostMethod" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockRepurchasedAndRetiredDuringPeriodShares" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockRepurchasedAndRetiredDuringPeriodShares"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockRepurchasedAndRetiredDuringPeriodShares" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockRepurchasedAndRetiredDuringPeriodValue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockRepurchasedAndRetiredDuringPeriodValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockRepurchasedAndRetiredDuringPeriodValue" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MinorityInterestDecreaseFromDistributionsToNoncontrollingInterestHolders" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MinorityInterestDecreaseFromDistributionsToNoncontrollingInterestHolders"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_MinorityInterestDecreaseFromDistributionsToNoncontrollingInterestHolders" order="7" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ConsolidatedCashFlow" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_StatementOfCashFlowsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementOfCashFlowsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProfitLoss" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProfitLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_ProfitLoss" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DepreciationDepletionAndAmortization" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_DepreciationDepletionAndAmortization" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NoncashOperatingLeaseExpense" xlink:href="rex-20260430.xsd#rex_NoncashOperatingLeaseExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="rex_NoncashOperatingLeaseExpense" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseRightOfUseAssetAmortization" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseRightOfUseAssetAmortization"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_FinanceLeaseRightOfUseAssetAmortization" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AllocatedShareBasedCompensationExpense" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AllocatedShareBasedCompensationExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_AllocatedShareBasedCompensationExpense" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromEquityMethodInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossFromEquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncomeLossFromEquityMethodInvestments" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ProceedsOfInterestIncomeFromInvestments" xlink:href="rex-20260430.xsd#rex_ProceedsOfInterestIncomeFromInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="rex_ProceedsOfInterestIncomeFromInvestments" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GainLossOnSaleOfPropertyPlantEquipment" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GainLossOnSaleOfPropertyPlantEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_GainLossOnSaleOfPropertyPlantEquipment" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredIncomeTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_DeferredIncomeTaxExpenseBenefit" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInAccountsReceivable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInAccountsReceivable" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInInventories" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInInventories" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInPrepaidExpensesOther" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInPrepaidExpensesOther"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInPrepaidExpensesOther" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInIncomeTaxesReceivable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInIncomeTaxesReceivable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInIncomeTaxesReceivable" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInAccountsPayableTrade" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccountsPayableTrade"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInAccountsPayableTrade" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInAccruedIncomeTaxesPayable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccruedIncomeTaxesPayable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInAccruedIncomeTaxesPayable" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInOtherOperatingLiabilities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInOtherOperatingLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInOtherOperatingLiabilities" order="15" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_NetCashProvidedByUsedInOperatingActivities" order="16" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" order="17" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquireShortTermInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToAcquireShortTermInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_PaymentsToAcquireShortTermInvestments" order="18" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromSaleOfShortTermInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromSaleOfShortTermInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_ProceedsFromSaleOfShortTermInvestments" order="19" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment" order="20" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromOtherDeposits" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromOtherDeposits"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_ProceedsFromOtherDeposits" order="21" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_NetCashProvidedByUsedInInvestingActivities" order="22" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsForRepurchaseOfCommonStock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_PaymentsForRepurchaseOfCommonStock" order="23" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToMinorityShareholders" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToMinorityShareholders"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_PaymentsToMinorityShareholders" order="24" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeasePrincipalPayments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeasePrincipalPayments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_FinanceLeasePrincipalPayments" order="25" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_NetCashProvidedByUsedInFinancingActivities" order="26" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect" order="27" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents" order="28" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NonCashInvestingActivitiesAccruedCapitalExpenditures" xlink:href="rex-20260430.xsd#rex_NonCashInvestingActivitiesAccruedCapitalExpenditures"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="rex_NonCashInvestingActivitiesAccruedCapitalExpenditures" order="29" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NonCashInvestingActivitiesCapitalAdditionsTransferredFromPrepaidExpenses" xlink:href="rex-20260430.xsd#rex_NonCashInvestingActivitiesCapitalAdditionsTransferredFromPrepaidExpenses"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="rex_NonCashInvestingActivitiesCapitalAdditionsTransferredFromPrepaidExpenses" order="30" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NonCashFinancingActivitiesEquityAwardsAccrued" xlink:href="rex-20260430.xsd#rex_NonCashFinancingActivitiesEquityAwardsAccrued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="rex_NonCashFinancingActivitiesEquityAwardsAccrued" order="31" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NonCashFinancingActivitiesStockRepurchasesAccrued" xlink:href="rex-20260430.xsd#rex_NonCashFinancingActivitiesStockRepurchasesAccrued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="rex_NonCashFinancingActivitiesStockRepurchasesAccrued" order="32" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NoncashFinancingActivitiesExciseTaxOnStockRepurchasesAccrued" xlink:href="rex-20260430.xsd#rex_NoncashFinancingActivitiesExciseTaxOnStockRepurchasesAccrued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="rex_NoncashFinancingActivitiesExciseTaxOnStockRepurchasesAccrued" order="33" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability" order="34" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RightOfUseAssetObtainedInExchangeForFinanceLeaseLiability" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RightOfUseAssetObtainedInExchangeForFinanceLeaseLiability"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_RightOfUseAssetObtainedInExchangeForFinanceLeaseLiability" order="35" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ConsolidatedFinancialStatements" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_OrganizationConsolidationAndPresentationOfFinancialStatementsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OrganizationConsolidationAndPresentationOfFinancialStatementsAbstract"/>
    <loc xlink:type="locator" xlink:label="srt_CondensedFinancialStatementsTextBlock" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_CondensedFinancialStatementsTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OrganizationConsolidationAndPresentationOfFinancialStatementsAbstract" xlink:to="srt_CondensedFinancialStatementsTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/AccountingPolicies" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_AccountingPoliciesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountingPoliciesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SignificantAccountingPoliciesTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SignificantAccountingPoliciesTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_SignificantAccountingPoliciesTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/NetSalesandRevenue" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RevenueFromContractWithCustomerAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RevenueFromContractWithCustomerTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RevenueFromContractWithCustomerAbstract" xlink:to="us-gaap_RevenueFromContractWithCustomerTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/Leases" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_LeasesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeasesAbstract"/>
    <loc xlink:type="locator" xlink:label="rex_LesseeFinanceAndOperatingLeasesTextBlock" xlink:href="rex-20260430.xsd#rex_LesseeFinanceAndOperatingLeasesTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="rex_LesseeFinanceAndOperatingLeasesTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/FairValue" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueDisclosuresAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueDisclosuresAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueDisclosuresTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueDisclosuresTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueDisclosuresAbstract" xlink:to="us-gaap_FairValueDisclosuresTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/PropertyandEquipment" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/OtherAssets" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherAssetsAbstract" xlink:to="us-gaap_OtherAssetsDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/AccruedExpensesandOtherCurrentLiabilities" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_PayablesAndAccrualsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PayablesAndAccrualsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_AccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/DerivativeFinancialInstruments" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:to="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/Investments" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisclosureTextBlockSupplementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InvestmentTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:to="us-gaap_InvestmentTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/EmployeeBenefits" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CompensationAndRetirementDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CompensationAndEmployeeBenefitPlansTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CompensationAndEmployeeBenefitPlansTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_CompensationAndEmployeeBenefitPlansTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/IncomeTaxes" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/CommitmentsandContingencies" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_CommitmentsAndContingenciesDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommitmentsAndContingenciesDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommitmentsAndContingenciesDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommitmentsAndContingenciesDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CommitmentsAndContingenciesDisclosureAbstract" xlink:to="us-gaap_CommitmentsAndContingenciesDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/RelatedPartyTransactions" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionsDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionsDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyTransactionsAbstract" xlink:to="us-gaap_RelatedPartyTransactionsDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/SegmentReporting" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentReportingAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentReportingDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingAbstract" xlink:to="us-gaap_SegmentReportingDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/AccountingPoliciesByPolicy" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_AccountingPoliciesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountingPoliciesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UseOfEstimates" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UseOfEstimates"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_UseOfEstimates" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CashAndCashEquivalentsPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashAndCashEquivalentsPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_CashAndCashEquivalentsPolicyTextBlock" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RevenueRecognitionPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RevenueRecognitionPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_RevenueRecognitionPolicyTextBlock" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TradeAndOtherAccountsReceivablePolicy" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TradeAndOtherAccountsReceivablePolicy"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_TradeAndOtherAccountsReceivablePolicy" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ChangeInAccountingPrinciplesPolicyTextBlock" xlink:href="rex-20260430.xsd#rex_ChangeInAccountingPrinciplesPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="rex_ChangeInAccountingPrinciplesPolicyTextBlock" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CostOfSalesPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CostOfSalesPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_CostOfSalesPolicyTextBlock" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SellingGeneralAndAdministrativeExpensesPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SellingGeneralAndAdministrativeExpensesPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_SellingGeneralAndAdministrativeExpensesPolicyTextBlock" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueOfFinancialInstrumentsPolicy" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueOfFinancialInstrumentsPolicy"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_FairValueOfFinancialInstrumentsPolicy" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_IncomeTaxPolicyTextBlock" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_InventoryPolicyTextBlock" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentPolicyTextBlock" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InvestmentPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_InvestmentPolicyTextBlock" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock" order="12" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/AccountingPoliciesTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_AccountingPoliciesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountingPoliciesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfErrorCorrectionsAndPriorPeriodAdjustmentsTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfErrorCorrectionsAndPriorPeriodAdjustmentsTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ScheduleOfErrorCorrectionsAndPriorPeriodAdjustmentsTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfInventoryCurrentTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfInventoryCurrentTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ScheduleOfInventoryCurrentTableTextBlock" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/NetSalesandRevenueTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RevenueFromContractWithCustomerAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DisaggregationOfRevenueTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisaggregationOfRevenueTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RevenueFromContractWithCustomerAbstract" xlink:to="us-gaap_DisaggregationOfRevenueTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/LeasesTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_LeasesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeasesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeaseCostTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeaseCostTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LeaseCostTableTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityMaturityTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityMaturityTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityMaturityTableTextBlock" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityMaturityTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityMaturityTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityMaturityTableTextBlock" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/FairValueTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueDisclosuresAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueDisclosuresAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfFairValueAssetsAndLiabilitiesMeasuredOnRecurringBasisTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfFairValueAssetsAndLiabilitiesMeasuredOnRecurringBasisTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueDisclosuresAbstract" xlink:to="us-gaap_ScheduleOfFairValueAssetsAndLiabilitiesMeasuredOnRecurringBasisTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/PropertyandEquipmentTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/OtherAssetsTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfOtherAssetsTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfOtherAssetsTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherAssetsAbstract" xlink:to="us-gaap_ScheduleOfOtherAssetsTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/AccruedExpensesandOtherCurrentLiabilitiesTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_PayablesAndAccrualsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PayablesAndAccrualsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfAccruedLiabilitiesTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfAccruedLiabilitiesTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_ScheduleOfAccruedLiabilitiesTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/DerivativeFinancialInstrumentsTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfDerivativeAssetsAtFairValueTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfDerivativeAssetsAtFairValueTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:to="us-gaap_ScheduleOfDerivativeAssetsAtFairValueTableTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfDerivativeInstrumentsTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfDerivativeInstrumentsTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:to="us-gaap_ScheduleOfDerivativeInstrumentsTextBlock" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/InvestmentsTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisclosureTextBlockSupplementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentsTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestmentsTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:to="us-gaap_EquityMethodInvestmentsTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfSaleOfStockBySubsidiaryOrEquityMethodInvesteeDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfSaleOfStockBySubsidiaryOrEquityMethodInvesteeDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:to="us-gaap_ScheduleOfSaleOfStockBySubsidiaryOrEquityMethodInvesteeDisclosureTextBlock" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/EmployeeBenefitsTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CompensationAndRetirementDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NonvestedRestrictedStockSharesActivityTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NonvestedRestrictedStockSharesActivityTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_NonvestedRestrictedStockSharesActivityTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/IncomeTaxesTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfUnrecognizedTaxBenefitsRollForwardTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfUnrecognizedTaxBenefitsRollForwardTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ScheduleOfUnrecognizedTaxBenefitsRollForwardTableTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfUnrecognizedTaxBenefitsTableTextBlock" xlink:href="rex-20260430.xsd#rex_ScheduleOfUnrecognizedTaxBenefitsTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="rex_ScheduleOfUnrecognizedTaxBenefitsTableTextBlock" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/SegmentReportingTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentReportingAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingAbstract" xlink:to="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/SummaryofReclassificationsTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ErrorCorrectionsAndPriorPeriodAdjustmentsRestatementLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ErrorCorrectionsAndPriorPeriodAdjustmentsRestatementLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfErrorCorrectionsAndPriorPeriodAdjustmentRestatementTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfErrorCorrectionsAndPriorPeriodAdjustmentRestatementTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ErrorCorrectionsAndPriorPeriodAdjustmentsRestatementLineItems" xlink:to="us-gaap_ScheduleOfErrorCorrectionsAndPriorPeriodAdjustmentRestatementTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RestatementAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RestatementAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfErrorCorrectionsAndPriorPeriodAdjustmentRestatementTable" xlink:to="srt_RestatementAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RestatementDomain" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RestatementDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_RestatementAxis" xlink:to="srt_RestatementDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RestatementDomain_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RestatementDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_RestatementAxis" xlink:to="srt_RestatementDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScenarioPreviouslyReportedMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScenarioPreviouslyReportedMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RestatementDomain" xlink:to="srt_ScenarioPreviouslyReportedMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RevisionOfPriorPeriodChangeInAccountingPrincipleAdjustmentMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RevisionOfPriorPeriodChangeInAccountingPrincipleAdjustmentMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RestatementDomain" xlink:to="srt_RevisionOfPriorPeriodChangeInAccountingPrincipleAdjustmentMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ProductionTaxCreditIncome" xlink:href="rex-20260430.xsd#rex_ProductionTaxCreditIncome"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ErrorCorrectionsAndPriorPeriodAdjustmentsRestatementLineItems" xlink:to="rex_ProductionTaxCreditIncome" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GrossProfit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GrossProfit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ErrorCorrectionsAndPriorPeriodAdjustmentsRestatementLineItems" xlink:to="us-gaap_GrossProfit" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossAttributableToParent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossAttributableToParent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ErrorCorrectionsAndPriorPeriodAdjustmentsRestatementLineItems" xlink:to="us-gaap_IncomeLossAttributableToParent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ErrorCorrectionsAndPriorPeriodAdjustmentsRestatementLineItems" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetInvestmentIncome" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetInvestmentIncome"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ErrorCorrectionsAndPriorPeriodAdjustmentsRestatementLineItems" xlink:to="us-gaap_NetInvestmentIncome" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ErrorCorrectionsAndPriorPeriodAdjustmentsRestatementLineItems" xlink:to="us-gaap_IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ErrorCorrectionsAndPriorPeriodAdjustmentsRestatementLineItems" xlink:to="us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic" order="6" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofInventoryTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryCurrentTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryCurrentTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_InventoryLineItems" xlink:to="us-gaap_InventoryCurrentTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_StatementScenarioAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_StatementScenarioAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_InventoryCurrentTable" xlink:to="srt_StatementScenarioAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScenarioUnspecifiedDomain" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_StatementScenarioAxis" xlink:to="srt_ScenarioUnspecifiedDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScenarioUnspecifiedDomain_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_StatementScenarioAxis" xlink:to="srt_ScenarioUnspecifiedDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryFinishedGoods" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryFinishedGoods"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InventoryLineItems" xlink:to="us-gaap_InventoryFinishedGoods" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryWorkInProcess" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryWorkInProcess"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InventoryLineItems" xlink:to="us-gaap_InventoryWorkInProcess" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryRawMaterialsAndSupplies" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryRawMaterialsAndSupplies"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InventoryLineItems" xlink:to="us-gaap_InventoryRawMaterialsAndSupplies" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryNet" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InventoryLineItems" xlink:to="us-gaap_InventoryNet" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleDisaggregatedRevenuebyProductTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DisaggregationOfRevenueLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DisaggregationOfRevenueTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_DisaggregationOfRevenueLineItems" xlink:to="us-gaap_DisaggregationOfRevenueTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ProductOrServiceAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ProductOrServiceAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DisaggregationOfRevenueTable" xlink:to="srt_ProductOrServiceAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ProductsAndServicesDomain" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ProductsAndServicesDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ProductOrServiceAxis" xlink:to="srt_ProductsAndServicesDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ProductsAndServicesDomain_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ProductsAndServicesDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_ProductOrServiceAxis" xlink:to="srt_ProductsAndServicesDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolMember" xlink:href="rex-20260430.xsd#rex_EthanolMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="rex_EthanolMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_DriedDistillersGrainsMember" xlink:href="rex-20260430.xsd#rex_DriedDistillersGrainsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="rex_DriedDistillersGrainsMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_DistillersCornOilMember" xlink:href="rex-20260430.xsd#rex_DistillersCornOilMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="rex_DistillersCornOilMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ModifiedDistillersGrainsMember" xlink:href="rex-20260430.xsd#rex_ModifiedDistillersGrainsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="rex_ModifiedDistillersGrainsMember" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_DerivativeFinancialInstrumentGainsLossesMember" xlink:href="rex-20260430.xsd#rex_DerivativeFinancialInstrumentGainsLossesMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="rex_DerivativeFinancialInstrumentGainsLossesMember" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OtherMember" xlink:href="rex-20260430.xsd#rex_OtherMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="rex_OtherMember" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Revenues" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Revenues"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisaggregationOfRevenueLineItems" xlink:to="us-gaap_Revenues" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofLeaseCostTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_LeasesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeasesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseCost" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseCost"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_OperatingLeaseCost" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_VariableLeaseCost" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_VariableLeaseCost"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_VariableLeaseCost" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeaseCost" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeaseCost"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LeaseCost" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeasePayments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeasePayments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_OperatingLeasePayments" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/FutureMinimumRentalPaymentsforOperatingLeasesTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_LeasesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeasesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseLiability" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiability"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_OperatingLeaseLiability" order="7" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/FutureMinimumRentalPaymentsforFinancingLeasesTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_LeasesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeasesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDueAfterYearFive" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueAfterYearFive"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDueAfterYearFive" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDue" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityUndiscountedExcessAmount" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityUndiscountedExcessAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityUndiscountedExcessAmount" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiability" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiability"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiability" order="8" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:to="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueByMeasurementFrequencyAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueByMeasurementFrequencyAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:to="us-gaap_FairValueByMeasurementFrequencyAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementFrequencyDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FairValueByMeasurementFrequencyAxis" xlink:to="us-gaap_FairValueMeasurementFrequencyDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementFrequencyDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FairValueByMeasurementFrequencyAxis" xlink:to="us-gaap_FairValueMeasurementFrequencyDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:to="us-gaap_FairValueByFairValueHierarchyLevelAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:to="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementsFairValueHierarchyDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:to="us-gaap_FairValueMeasurementsFairValueHierarchyDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinancialInstrumentAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancialInstrumentAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:to="us-gaap_FinancialInstrumentAxis" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FinancialInstrumentAxis" xlink:to="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FinancialInstrumentAxis" xlink:to="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel1Member" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueInputsLevel1Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel1Member" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel2Member" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueInputsLevel2Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel2Member" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel3Member" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueInputsLevel3Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel3Member" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementsRecurringMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueMeasurementsRecurringMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementFrequencyDomain" xlink:to="us-gaap_FairValueMeasurementsRecurringMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ForwardPurchaseContractsAssetMember" xlink:href="rex-20260430.xsd#rex_ForwardPurchaseContractsAssetMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="rex_ForwardPurchaseContractsAssetMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CommodityFuturesAssetMember" xlink:href="rex-20260430.xsd#rex_CommodityFuturesAssetMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="rex_CommodityFuturesAssetMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ForwardPurchaseContractsLiabilityMember" xlink:href="rex-20260430.xsd#rex_ForwardPurchaseContractsLiabilityMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="rex_ForwardPurchaseContractsLiabilityMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsFairValueDisclosure" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsFairValueDisclosure"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:to="us-gaap_AssetsFairValueDisclosure" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesFairValueDisclosure" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesFairValueDisclosure"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:to="us-gaap_LiabilitiesFairValueDisclosure" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ComponentsofPropertyandEquipmentTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfPropertyPlantAndEquipmentTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_StatementScenarioAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_StatementScenarioAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:to="srt_StatementScenarioAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScenarioUnspecifiedDomain" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_StatementScenarioAxis" xlink:to="srt_ScenarioUnspecifiedDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScenarioUnspecifiedDomain_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_StatementScenarioAxis" xlink:to="srt_ScenarioUnspecifiedDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LandAndLandImprovements" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LandAndLandImprovements"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_LandAndLandImprovements" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_BuildingsAndImprovementsGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BuildingsAndImprovementsGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_BuildingsAndImprovementsGross" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MachineryAndEquipmentGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MachineryAndEquipmentGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_MachineryAndEquipmentGross" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConstructionInProgressGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConstructionInProgressGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_ConstructionInProgressGross" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_PropertyPlantAndEquipmentGross" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PublicUtilitiesPropertyPlantAndEquipmentNet" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PublicUtilitiesPropertyPlantAndEquipmentNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_PublicUtilitiesPropertyPlantAndEquipmentNet" order="6" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofOtherAssetsTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredIncomeTaxesAndOtherAssetsNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxesAndOtherAssetsNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherAssetsAbstract" xlink:to="us-gaap_DeferredIncomeTaxesAndOtherAssetsNoncurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_DeferredIncomeProductionTaxCreditsNoncurrent" xlink:href="rex-20260430.xsd#rex_DeferredIncomeProductionTaxCreditsNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherAssetsAbstract" xlink:to="rex_DeferredIncomeProductionTaxCreditsNoncurrent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsMiscellaneousNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsMiscellaneousNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherAssetsAbstract" xlink:to="us-gaap_OtherAssetsMiscellaneousNoncurrent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherAssetsAbstract" xlink:to="us-gaap_OtherAssetsNoncurrent" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofAccruedExpensesandOtherCurrentLiabilitiesTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_PayablesAndAccrualsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PayablesAndAccrualsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EmployeeRelatedLiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_EmployeeRelatedLiabilitiesCurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccruedUtilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccruedUtilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_AccruedUtilitiesCurrent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_AccruedCapitalExpendituresCurrent" xlink:href="rex-20260430.xsd#rex_AccruedCapitalExpendituresCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="rex_AccruedCapitalExpendituresCurrent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_AccruedTransportationRelatedItems" xlink:href="rex-20260430.xsd#rex_AccruedTransportationRelatedItems"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="rex_AccruedTransportationRelatedItems" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccrualForTaxesOtherThanIncomeTaxesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccrualForTaxesOtherThanIncomeTaxesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_AccrualForTaxesOtherThanIncomeTaxesCurrent" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_AccruedForwardPurchaseContractsCurrent" xlink:href="rex-20260430.xsd#rex_AccruedForwardPurchaseContractsCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="rex_AccruedForwardPurchaseContractsCurrent" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAccruedLiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAccruedLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_OtherAccruedLiabilitiesCurrent" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccruedLiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_AccruedLiabilitiesCurrent" order="7" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/FairValuesforDerivativeFinancialInstrumentsTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_OffsettingAssetsLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OffsettingAssetsLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OffsettingAssetsTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OffsettingAssetsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_OffsettingAssetsLineItems" xlink:to="us-gaap_OffsettingAssetsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentRiskAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_OffsettingAssetsTable" xlink:to="us-gaap_DerivativeInstrumentRiskAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ForwardContractsMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ForwardContractsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_ForwardContractsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CashCollateralBalanceMember" xlink:href="rex-20260430.xsd#rex_CashCollateralBalanceMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="rex_CashCollateralBalanceMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommodityContractMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommodityContractMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_CommodityContractMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NetPositionWithBrokerMember" xlink:href="rex-20260430.xsd#rex_NetPositionWithBrokerMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="rex_NetPositionWithBrokerMember" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeAssets" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeAssets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OffsettingAssetsLineItems" xlink:to="us-gaap_DerivativeAssets" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeLiabilities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OffsettingAssetsLineItems" xlink:to="us-gaap_DerivativeLiabilities" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/StatementsofOperationsTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GainLossOnDerivativeInstrumentsNetPretax" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GainLossOnDerivativeInstrumentsNetPretax"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:to="us-gaap_GainLossOnDerivativeInstrumentsNetPretax" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_GainLossOnDerivativeInstrumentsCostOfSales" xlink:href="rex-20260430.xsd#rex_GainLossOnDerivativeInstrumentsCostOfSales"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:to="rex_GainLossOnDerivativeInstrumentsCostOfSales" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofEquityMethodInvestmentsTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_ScheduleOfEquityMethodInvestmentsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:to="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_BigRiverMember" xlink:href="rex-20260430.xsd#rex_BigRiverMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_EquityMethodInvesteeNameDomain" xlink:to="rex_BigRiverMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentOwnershipPercentage" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestmentOwnershipPercentage"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_EquityMethodInvestmentOwnershipPercentage" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_EquityMethodInvestments" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofFinancialInformationforEquityMethodInvestmentsTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_ScheduleOfEquityMethodInvestmentsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_LegalEntityAxis" xlink:href="https://xbrl.sec.gov/dei/2026/dei-2026.xsd#dei_LegalEntityAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:to="dei_LegalEntityAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain" xlink:href="https://xbrl.sec.gov/dei/2026/dei-2026.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain_0" xlink:href="https://xbrl.sec.gov/dei/2026/dei-2026.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_BigRiverMember" xlink:href="rex-20260430.xsd#rex_BigRiverMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityDomain" xlink:to="rex_BigRiverMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Revenues" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Revenues"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_Revenues" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ProductionTaxCreditIncome" xlink:href="rex-20260430.xsd#rex_ProductionTaxCreditIncome"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="rex_ProductionTaxCreditIncome" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GrossProfit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GrossProfit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_GrossProfit" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Depreciation" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Depreciation"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_Depreciation" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetIncomeLoss" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_NetIncomeLoss" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetIncomeLossAttributableToNoncontrollingInterest" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLossAttributableToNoncontrollingInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_NetIncomeLossAttributableToNoncontrollingInterest" order="5" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/NonVestedRestrictedStockAwardActivityTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CompensationAndRetirementDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsWeightedAverageGrantDateFairValue" xlink:href="rex-20260430.xsd#rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsWeightedAverageGrantDateFairValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsWeightedAverageGrantDateFairValue" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTermsInYears" xlink:href="rex-20260430.xsd#rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTermsInYears"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTermsInYears" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockGrantedDuringPeriodValueSharebasedCompensationGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockGrantedDuringPeriodValueSharebasedCompensationGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_StockGrantedDuringPeriodValueSharebasedCompensationGross" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardForfeited" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardForfeited"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardForfeited" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardForfeitures" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardForfeitures"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardForfeitures" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedInPeriodFairValue1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedInPeriodFairValue1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedInPeriodFairValue1" order="8" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/UnrecognizedTaxBenefitsRollForwardTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefits" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UnrecognizedTaxBenefits"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_UnrecognizedTaxBenefits" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromPriorPeriodTaxPositions" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromPriorPeriodTaxPositions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromPriorPeriodTaxPositions" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromCurrentPeriodTaxPositions" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromCurrentPeriodTaxPositions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromCurrentPeriodTaxPositions" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/UnrecognizedTaxBenefitConsolidatedBalanceSheetTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxContingencyLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxContingencyLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxContingencyTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxContingencyTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_IncomeTaxContingencyLineItems" xlink:to="us-gaap_IncomeTaxContingencyTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MeasurementInputTypeAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MeasurementInputTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_IncomeTaxContingencyTable" xlink:to="us-gaap_MeasurementInputTypeAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MeasurementInputTypeDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_MeasurementInputTypeAxis" xlink:to="us-gaap_MeasurementInputTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MeasurementInputTypeDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_MeasurementInputTypeAxis" xlink:to="us-gaap_MeasurementInputTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_UnrecognizedTaxBenefitMember" xlink:href="rex-20260430.xsd#rex_UnrecognizedTaxBenefitMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_MeasurementInputTypeDomain" xlink:to="rex_UnrecognizedTaxBenefitMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxesReceivable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxesReceivable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxContingencyLineItems" xlink:to="us-gaap_IncomeTaxesReceivable" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherLiabilitiesNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxContingencyLineItems" xlink:to="us-gaap_OtherLiabilitiesNoncurrent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefits" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UnrecognizedTaxBenefits"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxContingencyLineItems" xlink:to="us-gaap_UnrecognizedTaxBenefits" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ReportableSegmentTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingInformationLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolAndByProductsMember" xlink:href="rex-20260430.xsd#rex_EthanolAndByProductsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EthanolAndByProductsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EquityMethodEthanolInvestmentMember" xlink:href="rex-20260430.xsd#rex_EquityMethodEthanolInvestmentMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EquityMethodEthanolInvestmentMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CornMember" xlink:href="rex-20260430.xsd#rex_CornMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_CornMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OtherCostOfSalesMember" xlink:href="rex-20260430.xsd#rex_OtherCostOfSalesMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_OtherCostOfSalesMember" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Revenues" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Revenues"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_Revenues" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ProductionTaxCreditIncome" xlink:href="rex-20260430.xsd#rex_ProductionTaxCreditIncome"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="rex_ProductionTaxCreditIncome" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CostOfGoodsAndServicesSold" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_CostOfGoodsAndServicesSold" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GrossProfit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GrossProfit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_GrossProfit" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DepreciationAndAmortization" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DepreciationAndAmortization"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_DepreciationAndAmortization" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossAttributableToParent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossAttributableToParent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_IncomeLossAttributableToParent" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetInvestmentIncome" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetInvestmentIncome"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_NetInvestmentIncome" order="7" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ConsolidatedFinancialStatementsDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetLineItems" xlink:to="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetTable" xlink:to="srt_RangeAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SubsegmentsAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SubsegmentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetTable" xlink:to="us-gaap_SubsegmentsAxis" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SubsegmentsDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SubsegmentsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_SubsegmentsAxis" xlink:to="us-gaap_SubsegmentsDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SubsegmentsDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SubsegmentsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_SubsegmentsAxis" xlink:to="us-gaap_SubsegmentsDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionsByRelatedPartyAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetTable" xlink:to="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetTable" xlink:to="us-gaap_DividendsAxis" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DividendsAxis" xlink:to="us-gaap_DividendsDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_DividendsAxis" xlink:to="us-gaap_DividendsDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyDomain" xlink:to="us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_S2025Q2DividendsMember" xlink:href="rex-20260430.xsd#rex_S2025Q2DividendsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DividendsDomain" xlink:to="rex_S2025Q2DividendsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SubsequentEventMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SubsequentEventMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SubsegmentsDomain" xlink:to="us-gaap_SubsequentEventMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MinimumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MinimumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MinimumMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MaximumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MaximumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MaximumMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolAndByProductsMember" xlink:href="rex-20260430.xsd#rex_EthanolAndByProductsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EthanolAndByProductsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolMember" xlink:href="rex-20260430.xsd#rex_EthanolMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EthanolMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockSharesAuthorized" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockSharesAuthorized"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetLineItems" xlink:to="us-gaap_CommonStockSharesAuthorized" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquityNoteStockSplitConversionRatio1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquityNoteStockSplitConversionRatio1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetLineItems" xlink:to="us-gaap_StockholdersEquityNoteStockSplitConversionRatio1" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_StockDividendPercent" xlink:href="rex-20260430.xsd#rex_StockDividendPercent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetLineItems" xlink:to="rex_StockDividendPercent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsPayableDateDeclaredMonthAndYear" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsPayableDateDeclaredMonthAndYear"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetLineItems" xlink:to="us-gaap_DividendsPayableDateDeclaredMonthAndYear" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsPayableDateOfRecordDayMonthAndYear" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsPayableDateOfRecordDayMonthAndYear"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetLineItems" xlink:to="us-gaap_DividendsPayableDateOfRecordDayMonthAndYear" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NumberOfReportableSegments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NumberOfReportableSegments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ConsolidationLessThanWhollyOwnedSubsidiaryParentOwnershipInterestEffectsOfChangesNetLineItems" xlink:to="us-gaap_NumberOfReportableSegments" order="5" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/AccountingPoliciesDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfPropertyPlantAndEquipmentTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:to="srt_RangeAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:to="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:to="us-gaap_PropertyPlantAndEquipmentByTypeAxis" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:to="us-gaap_PropertyPlantAndEquipmentTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentTypeDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:to="us-gaap_PropertyPlantAndEquipmentTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ApproximateMeasurementAxis" xlink:href="rex-20260430.xsd#rex_ApproximateMeasurementAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:to="rex_ApproximateMeasurementAxis" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ApproximateMeasurementDomainDomain" xlink:href="rex-20260430.xsd#rex_ApproximateMeasurementDomainDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="rex_ApproximateMeasurementAxis" xlink:to="rex_ApproximateMeasurementDomainDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ApproximateMeasurementDomainDomain_0" xlink:href="rex-20260430.xsd#rex_ApproximateMeasurementDomainDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="rex_ApproximateMeasurementAxis" xlink:to="rex_ApproximateMeasurementDomainDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ApproximationMember" xlink:href="rex-20260430.xsd#rex_ApproximationMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ApproximateMeasurementDomainDomain" xlink:to="rex_ApproximationMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_BuildingAndBuildingImprovementsMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BuildingAndBuildingImprovementsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:to="us-gaap_BuildingAndBuildingImprovementsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FurnitureAndFixturesMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FurnitureAndFixturesMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:to="us-gaap_FurnitureAndFixturesMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RexAmericanResourcesMember" xlink:href="rex-20260430.xsd#rex_RexAmericanResourcesMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_EquityMethodInvesteeNameDomain" xlink:to="rex_RexAmericanResourcesMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MinimumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MinimumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MinimumMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MaximumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MaximumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MaximumMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsReceivableNetCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_AccountsReceivableNetCurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxesPaid" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxesPaid"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_IncomeTaxesPaid" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromIncomeTaxRefunds" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromIncomeTaxRefunds"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_ProceedsFromIncomeTaxRefunds" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefits" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UnrecognizedTaxBenefits"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_UnrecognizedTaxBenefits" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxExaminationPenaltiesAndInterestAccrued" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExaminationPenaltiesAndInterestAccrued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_IncomeTaxExaminationPenaltiesAndInterestAccrued" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DecreaseInUnrecognizedTaxBenefitsIsReasonablyPossible" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DecreaseInUnrecognizedTaxBenefitsIsReasonablyPossible"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_DecreaseInUnrecognizedTaxBenefitsIsReasonablyPossible" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryWriteDown" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryWriteDown"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_InventoryWriteDown" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentUsefulLife" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentUsefulLife"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_PropertyPlantAndEquipmentUsefulLife" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentOwnershipPercentage" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestmentOwnershipPercentage"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentLineItems" xlink:to="us-gaap_EquityMethodInvestmentOwnershipPercentage" order="8" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/NetSalesandRevenueDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DisaggregationOfRevenueLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DisaggregationOfRevenueTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_DisaggregationOfRevenueLineItems" xlink:to="us-gaap_DisaggregationOfRevenueTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DisaggregationOfRevenueTable" xlink:to="srt_RangeAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MinimumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MinimumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MinimumMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MaximumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MaximumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MaximumMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_SalesPaymentTerms" xlink:href="rex-20260430.xsd#rex_SalesPaymentTerms"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisaggregationOfRevenueLineItems" xlink:to="rex_SalesPaymentTerms" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/LeasesDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeLeaseDescriptionLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeLeaseDescriptionLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeLeaseDescriptionTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeLeaseDescriptionTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_LesseeLeaseDescriptionTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_FrequencyAxis" xlink:href="rex-20260430.xsd#rex_FrequencyAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_LesseeLeaseDescriptionTable" xlink:to="rex_FrequencyAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_FrequencyDomainDomain" xlink:href="rex-20260430.xsd#rex_FrequencyDomainDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="rex_FrequencyAxis" xlink:to="rex_FrequencyDomainDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_FrequencyDomainDomain_0" xlink:href="rex-20260430.xsd#rex_FrequencyDomainDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="rex_FrequencyAxis" xlink:to="rex_FrequencyDomainDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_MonthlyMember" xlink:href="rex-20260430.xsd#rex_MonthlyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_FrequencyDomainDomain" xlink:to="rex_MonthlyMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_FinanceLeasePrepayments" xlink:href="rex-20260430.xsd#rex_FinanceLeasePrepayments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="rex_FinanceLeasePrepayments" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDue" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeFinanceLeaseTermOfContract1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeFinanceLeaseTermOfContract1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_LesseeFinanceLeaseTermOfContract1" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_FinancingLeaseExpense" xlink:href="rex-20260430.xsd#rex_FinancingLeaseExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="rex_FinancingLeaseExpense" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseInterestExpense" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseInterestExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_FinanceLeaseInterestExpense" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeFinanceLeaseRemainingLeaseTerm" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeFinanceLeaseRemainingLeaseTerm"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_LesseeFinanceLeaseRemainingLeaseTerm" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent" order="8" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/OtherAssetsDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="rex_OtherAssetsDetailsLineItems" xlink:href="rex-20260430.xsd#rex_OtherAssetsDetailsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_OtherAssetsDetailsTable" xlink:href="rex-20260430.xsd#rex_OtherAssetsDetailsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_OtherAssetsDetailsLineItems" xlink:to="rex_OtherAssetsDetailsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ProductionTaxCreditDeferredTaxAssetRecognized" xlink:href="rex-20260430.xsd#rex_ProductionTaxCreditDeferredTaxAssetRecognized"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_OtherAssetsDetailsLineItems" xlink:to="rex_ProductionTaxCreditDeferredTaxAssetRecognized" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_DeferredIncomeProductionTaxCreditsNoncurrent" xlink:href="rex-20260430.xsd#rex_DeferredIncomeProductionTaxCreditsNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_OtherAssetsDetailsLineItems" xlink:to="rex_DeferredIncomeProductionTaxCreditsNoncurrent" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/DerivativeFinancialInstrumentsDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ContractWithCustomerDurationAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ContractWithCustomerDurationAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_ContractWithCustomerDurationAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ContractWithCustomerDurationDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ContractWithCustomerDurationDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ContractWithCustomerDurationAxis" xlink:to="us-gaap_ContractWithCustomerDurationDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ContractWithCustomerDurationDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ContractWithCustomerDurationDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ContractWithCustomerDurationAxis" xlink:to="us-gaap_ContractWithCustomerDurationDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentRiskAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_DerivativeInstrumentRiskAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TradingActivityByTypeAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TradingActivityByTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_TradingActivityByTypeAxis" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TradingActivityByTypeDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TradingActivityByTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_TradingActivityByTypeAxis" xlink:to="us-gaap_TradingActivityByTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TradingActivityByTypeDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TradingActivityByTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_TradingActivityByTypeAxis" xlink:to="us-gaap_TradingActivityByTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShortMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShortMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ContractWithCustomerDurationDomain" xlink:to="us-gaap_ShortMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LongMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ContractWithCustomerDurationDomain" xlink:to="us-gaap_LongMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_AssetsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesTotalMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesTotalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_LiabilitiesTotalMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CornMember" xlink:href="rex-20260430.xsd#rex_CornMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TradingActivityByTypeDomain" xlink:to="rex_CornMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolMember" xlink:href="rex-20260430.xsd#rex_EthanolMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TradingActivityByTypeDomain" xlink:to="rex_EthanolMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeAssetStatementOfFinancialPositionExtensibleEnumeration" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeAssetStatementOfFinancialPositionExtensibleEnumeration"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_DerivativeAssetStatementOfFinancialPositionExtensibleEnumeration" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ForwardPurchaseContractsQuantity" xlink:href="rex-20260430.xsd#rex_ForwardPurchaseContractsQuantity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="rex_ForwardPurchaseContractsQuantity" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeLiabilityStatementOfFinancialPositionExtensibleEnumeration" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeLiabilityStatementOfFinancialPositionExtensibleEnumeration"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_DerivativeLiabilityStatementOfFinancialPositionExtensibleEnumeration" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CommodityFuturesQuantity" xlink:href="rex-20260430.xsd#rex_CommodityFuturesQuantity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="rex_CommodityFuturesQuantity" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/InvestmentsDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_ScheduleOfEquityMethodInvestmentsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:to="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_BigRiverMember" xlink:href="rex-20260430.xsd#rex_BigRiverMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_EquityMethodInvesteeNameDomain" xlink:to="rex_BigRiverMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RetainedEarningsUndistributedEarningsFromEquityMethodInvestees" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RetainedEarningsUndistributedEarningsFromEquityMethodInvestees"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_RetainedEarningsUndistributedEarningsFromEquityMethodInvestees" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromDividendsReceived" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromDividendsReceived"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_ProceedsFromDividendsReceived" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecurities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecurities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_HeldToMaturitySecurities" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesHeldToMaturityMaturityWithinOneYearWeightedAverageYield" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesHeldToMaturityMaturityWithinOneYearWeightedAverageYield"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_DebtSecuritiesHeldToMaturityMaturityWithinOneYearWeightedAverageYield" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss" order="4" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/EmployeeBenefitsDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="srt_RangeAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PlanNameAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PlanNameAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_PlanNameAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PlanNameDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PlanNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_PlanNameAxis" xlink:to="us-gaap_PlanNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PlanNameDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PlanNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_PlanNameAxis" xlink:to="us-gaap_PlanNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AwardTypeAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AwardTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_AwardTypeAxis" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_AwardTypeAxis" xlink:to="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_AwardTypeAxis" xlink:to="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SubsequentEventTypeAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SubsequentEventTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_SubsequentEventTypeAxis" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SubsequentEventTypeDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_SubsequentEventTypeAxis" xlink:to="us-gaap_SubsequentEventTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SubsequentEventTypeDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_SubsequentEventTypeAxis" xlink:to="us-gaap_SubsequentEventTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_StockOptionPlans2015Member" xlink:href="rex-20260430.xsd#rex_StockOptionPlans2015Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PlanNameDomain" xlink:to="rex_StockOptionPlans2015Member" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_StockOptionPlans2026Member" xlink:href="rex-20260430.xsd#rex_StockOptionPlans2026Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PlanNameDomain" xlink:to="rex_StockOptionPlans2026Member" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RestrictedStockMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RestrictedStockMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="us-gaap_RestrictedStockMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RestrictedStockUnitsRSUMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RestrictedStockUnitsRSUMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="us-gaap_RestrictedStockUnitsRSUMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MinimumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MinimumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MinimumMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MaximumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MaximumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MaximumMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SubsequentEventMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SubsequentEventMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SubsequentEventTypeDomain" xlink:to="us-gaap_SubsequentEventMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardGross" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardGross" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RestrictedStockUnitsEligibleToVestPercent" xlink:href="rex-20260430.xsd#rex_RestrictedStockUnitsEligibleToVestPercent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="rex_RestrictedStockUnitsEligibleToVestPercent" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CalculatedPayoutOfRestrictedStockUnitsPercent" xlink:href="rex-20260430.xsd#rex_CalculatedPayoutOfRestrictedStockUnitsPercent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="rex_CalculatedPayoutOfRestrictedStockUnitsPercent" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableNumber" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableNumber"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableNumber" order="8" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/IncomeTaxesDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateContinuingOperations" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateContinuingOperations" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/CommitmentsandContingenciesDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_LossContingenciesLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LossContingenciesLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LossContingenciesTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LossContingenciesTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_LossContingenciesLineItems" xlink:to="us-gaap_LossContingenciesTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeaseContractualTermAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeaseContractualTermAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_LossContingenciesTable" xlink:to="us-gaap_LeaseContractualTermAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeaseContractualTermDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeaseContractualTermDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_LeaseContractualTermAxis" xlink:to="us-gaap_LeaseContractualTermDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeaseContractualTermDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeaseContractualTermDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_LeaseContractualTermAxis" xlink:to="us-gaap_LeaseContractualTermDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_LegalEntityAxis" xlink:href="https://xbrl.sec.gov/dei/2026/dei-2026.xsd#dei_LegalEntityAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_LossContingenciesTable" xlink:to="dei_LegalEntityAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain" xlink:href="https://xbrl.sec.gov/dei/2026/dei-2026.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain_0" xlink:href="https://xbrl.sec.gov/dei/2026/dei-2026.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OneEarthEnergyAndNuGenEnergyMember" xlink:href="rex-20260430.xsd#rex_OneEarthEnergyAndNuGenEnergyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityDomain" xlink:to="rex_OneEarthEnergyAndNuGenEnergyMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OneEarthEnergyMember" xlink:href="rex-20260430.xsd#rex_OneEarthEnergyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityDomain" xlink:to="rex_OneEarthEnergyMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RenewalMember" xlink:href="rex-20260430.xsd#rex_RenewalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeaseContractualTermDomain" xlink:to="rex_RenewalMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LossContingencyLossInPeriod" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LossContingencyLossInPeriod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LossContingenciesLineItems" xlink:to="us-gaap_LossContingencyLossInPeriod" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ForwardPurchaseContractsQuantity" xlink:href="rex-20260430.xsd#rex_ForwardPurchaseContractsQuantity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LossContingenciesLineItems" xlink:to="rex_ForwardPurchaseContractsQuantity" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_QuantityOfNaturalGasUnderSalesCommitment" xlink:href="rex-20260430.xsd#rex_QuantityOfNaturalGasUnderSalesCommitment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LossContingenciesLineItems" xlink:to="rex_QuantityOfNaturalGasUnderSalesCommitment" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_QuantityOfEthanolUnderSalesCommitment" xlink:href="rex-20260430.xsd#rex_QuantityOfEthanolUnderSalesCommitment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LossContingenciesLineItems" xlink:to="rex_QuantityOfEthanolUnderSalesCommitment" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_QuantityOfDistillersGrainsUnderSalesCommitment" xlink:href="rex-20260430.xsd#rex_QuantityOfDistillersGrainsUnderSalesCommitment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LossContingenciesLineItems" xlink:to="rex_QuantityOfDistillersGrainsUnderSalesCommitment" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_QuantityOfNonFoodGradeCornOilUnderSalesCommitments" xlink:href="rex-20260430.xsd#rex_QuantityOfNonFoodGradeCornOilUnderSalesCommitments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LossContingenciesLineItems" xlink:to="rex_QuantityOfNonFoodGradeCornOilUnderSalesCommitments" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_LeaseExpirationPeriod" xlink:href="rex-20260430.xsd#rex_LeaseExpirationPeriod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LossContingenciesLineItems" xlink:to="rex_LeaseExpirationPeriod" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_InstallmentAmount" xlink:href="rex-20260430.xsd#rex_InstallmentAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LossContingenciesLineItems" xlink:to="rex_InstallmentAmount" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LossContingenciesLineItems" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PurchaseObligation" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PurchaseObligation"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LossContingenciesLineItems" xlink:to="us-gaap_PurchaseObligation" order="9" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/RelatedPartyTransactionsDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_RelatedPartyTransactionLineItems" xlink:to="us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionsByRelatedPartyAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable" xlink:to="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyDomain" xlink:to="us-gaap_RelatedPartyMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_PurchaseOfCornAndOtherSuppliesFromAffiliates" xlink:href="rex-20260430.xsd#rex_PurchaseOfCornAndOtherSuppliesFromAffiliates"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyTransactionLineItems" xlink:to="rex_PurchaseOfCornAndOtherSuppliesFromAffiliates" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsPayableCurrentAndNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsPayableCurrentAndNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyTransactionLineItems" xlink:to="us-gaap_AccountsPayableCurrentAndNoncurrent" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/SegmentReportingDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingInformationLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionsByRelatedPartyAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:to="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyDomain" xlink:to="us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolAndByProductsMember" xlink:href="rex-20260430.xsd#rex_EthanolAndByProductsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EthanolAndByProductsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolMember" xlink:href="rex-20260430.xsd#rex_EthanolMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EthanolMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NumberOfReportableSegments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NumberOfReportableSegments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_NumberOfReportableSegments" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://fasb.org/srt/role/srt-eedm/ExtensibleEnumerationLists" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccruedLiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LiabilitiesAbstract" xlink:to="us-gaap_AccruedLiabilitiesCurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
<!-- [WMV7][s0+tPBAaJMFgNb5lTtxiAp06GSdrVaR8Q5aue6Zj5iZKXJLk2ryJsJM8tuRHnJeYzNQ7DruQrRyqV6+mnas+LDPTZapsIWgA4yRCmMJsz9VcdopmnIUJXHznxQk/HTYLVD6DZFMGL65s8EIQF1vNScCfjvQ1vOoWaImyWkiKd+nxRVDYI5ACHXdZV5DHeFEvmfA3ap3HDhWMCXHt5KgOM+WiK38ScKgt2KHAPmlxwv+HDutsHo36d2EceohcP6hrGSEm1gdQ+XRM0rffTIu5aJBbNOtBseUBO7S6KDNORI3zCQ0PFXUVpe57iVw/r+cbs1twSW5k2k6pMw6TBEEqqWvClA==] CSR-->
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsAbstract" xlink:to="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" order="1" xbrldt:closed="true"/>
  </definitionLink>
</linkbase>
